﻿namespace CardManagement
{
    using System;
    using System.Runtime.CompilerServices;
    using System.Runtime.InteropServices;

    public class CHCNetSDK
    {
        public const int NET_DVR_NOERROR = 0;
        public const int NET_DVR_PASSWORD_ERROR = 1;
        public const int NET_DVR_NOENOUGHPRI = 2;
        public const int NET_DVR_NOINIT = 3;
        public const int NET_DVR_CHANNEL_ERROR = 4;
        public const int NET_DVR_OVER_MAXLINK = 5;
        public const int NET_DVR_VERSIONNOMATCH = 6;
        public const int NET_DVR_NETWORK_FAIL_CONNECT = 7;
        public const int NET_DVR_NETWORK_SEND_ERROR = 8;
        public const int NET_DVR_NETWORK_RECV_ERROR = 9;
        public const int NET_DVR_NETWORK_RECV_TIMEOUT = 10;
        public const int NET_DVR_NETWORK_ERRORDATA = 11;
        public const int NET_DVR_ORDER_ERROR = 12;
        public const int NET_DVR_OPERNOPERMIT = 13;
        public const int NET_DVR_COMMANDTIMEOUT = 14;
        public const int NET_DVR_ERRORSERIALPORT = 15;
        public const int NET_DVR_ERRORALARMPORT = 0x10;
        public const int NET_DVR_PARAMETER_ERROR = 0x11;
        public const int NET_DVR_CHAN_EXCEPTION = 0x12;
        public const int NET_DVR_NODISK = 0x13;
        public const int NET_DVR_ERRORDISKNUM = 20;
        public const int NET_DVR_DISK_FULL = 0x15;
        public const int NET_DVR_DISK_ERROR = 0x16;
        public const int NET_DVR_NOSUPPORT = 0x17;
        public const int NET_DVR_BUSY = 0x18;
        public const int NET_DVR_MODIFY_FAIL = 0x19;
        public const int NET_DVR_PASSWORD_FORMAT_ERROR = 0x1a;
        public const int NET_DVR_DISK_FORMATING = 0x1b;
        public const int NET_DVR_DVRNORESOURCE = 0x1c;
        public const int NET_DVR_DVROPRATEFAILED = 0x1d;
        public const int NET_DVR_OPENHOSTSOUND_FAIL = 30;
        public const int NET_DVR_DVRVOICEOPENED = 0x1f;
        public const int NET_DVR_TIMEINPUTERROR = 0x20;
        public const int NET_DVR_NOSPECFILE = 0x21;
        public const int NET_DVR_CREATEFILE_ERROR = 0x22;
        public const int NET_DVR_FILEOPENFAIL = 0x23;
        public const int NET_DVR_OPERNOTFINISH = 0x24;
        public const int NET_DVR_GETPLAYTIMEFAIL = 0x25;
        public const int NET_DVR_PLAYFAIL = 0x26;
        public const int NET_DVR_FILEFORMAT_ERROR = 0x27;
        public const int NET_DVR_DIR_ERROR = 40;
        public const int NET_DVR_ALLOC_RESOURCE_ERROR = 0x29;
        public const int NET_DVR_AUDIO_MODE_ERROR = 0x2a;
        public const int NET_DVR_NOENOUGH_BUF = 0x2b;
        public const int NET_DVR_CREATESOCKET_ERROR = 0x2c;
        public const int NET_DVR_SETSOCKET_ERROR = 0x2d;
        public const int NET_DVR_MAX_NUM = 0x2e;
        public const int NET_DVR_USERNOTEXIST = 0x2f;
        public const int NET_DVR_WRITEFLASHERROR = 0x30;
        public const int NET_DVR_UPGRADEFAIL = 0x31;
        public const int NET_DVR_CARDHAVEINIT = 50;
        public const int NET_DVR_PLAYERFAILED = 0x33;
        public const int NET_DVR_MAX_USERNUM = 0x34;
        public const int NET_DVR_GETLOCALIPANDMACFAIL = 0x35;
        public const int NET_DVR_NOENCODEING = 0x36;
        public const int NET_DVR_IPMISMATCH = 0x37;
        public const int NET_DVR_MACMISMATCH = 0x38;
        public const int NET_DVR_USER_LOCKED = 0x99;
        public const int NET_DVR_DEV_ADDRESS_MAX_LEN = 0x81;
        public const int NET_DVR_LOGIN_USERNAME_MAX_LEN = 0x40;
        public const int NET_DVR_LOGIN_PASSWD_MAX_LEN = 0x40;
        public const int SERIALNO_LEN = 0x30;
        public const int STREAM_ID_LEN = 0x20;
        public const int MAX_AUDIO_V40 = 8;
        public const int LOG_INFO_LEN = 0x2e40;
        public const int MAX_NAMELEN = 0x10;
        public const int MAX_DOMAIN_NAME = 0x40;
        public const int MAX_ETHERNET = 2;
        public const int NAME_LEN = 0x20;
        public const int PASSWD_LEN = 0x10;
        public const int MAX_RIGHT = 0x20;
        public const int MACADDR_LEN = 6;
        public const int DEV_TYPE_NAME_LEN = 0x18;
        public const int MAX_ANALOG_CHANNUM = 0x20;
        public const int MAX_IP_CHANNEL = 0x20;
        public const int MAX_CHANNUM_V30 = 0x40;
        public const int MAX_CHANNUM_V40 = 0x200;
        public const int MAX_IP_DEVICE_V40 = 0x40;
        public const int DEV_ID_LEN = 0x20;
        public const int MAX_IP_DEVICE = 0x20;
        public const int MAX_IP_ALARMIN_V40 = 0x1000;
        public const int MAX_IP_ALARMOUT_V40 = 0x1000;
        public const int MAX_IP_ALARMIN = 0x80;
        public const int MAX_IP_ALARMOUT = 0x40;
        public const int URL_LEN = 240;
        public const int MAX_AUDIOOUT_PRO_TYPE = 8;
        public const int ACS_ABILITY = 0x801;
        public const int NET_DVR_CLEAR_ACS_PARAM = 0x846;
        public const int NET_DVR_GET_ACS_EVENT = 0x9d2;
        public const int COMM_ALARM_ACS = 0x5002;
        public const int MAJOR_ALARM = 1;
        public const int MINOR_ALARMIN_SHORT_CIRCUIT = 0x400;
        public const int MINOR_ALARMIN_BROKEN_CIRCUIT = 0x401;
        public const int MINOR_ALARMIN_EXCEPTION = 0x402;
        public const int MINOR_ALARMIN_RESUME = 0x403;
        public const int MINOR_HOST_DESMANTLE_ALARM = 0x404;
        public const int MINOR_HOST_DESMANTLE_RESUME = 0x405;
        public const int MINOR_CARD_READER_DESMANTLE_ALARM = 0x406;
        public const int MINOR_CARD_READER_DESMANTLE_RESUME = 0x407;
        public const int MINOR_CASE_SENSOR_ALARM = 0x408;
        public const int MINOR_CASE_SENSOR_RESUME = 0x409;
        public const int MINOR_STRESS_ALARM = 0x40a;
        public const int MINOR_OFFLINE_ECENT_NEARLY_FULL = 0x40b;
        public const int MINOR_CARD_MAX_AUTHENTICATE_FAIL = 0x40c;
        public const int MINOR_SD_CARD_FULL = 0x40d;
        public const int MINOR_LINKAGE_CAPTURE_PIC = 0x40e;
        public const int MINOR_SECURITY_MODULE_DESMANTLE_ALARM = 0x40f;
        public const int MINOR_SECURITY_MODULE_DESMANTLE_RESUME = 0x410;
        public const int MINOR_POS_START_ALARM = 0x411;
        public const int MINOR_POS_END_ALARM = 0x412;
        public const int MINOR_FACE_IMAGE_QUALITY_LOW = 0x413;
        public const int MINOR_FINGE_RPRINT_QUALITY_LOW = 0x414;
        public const int MINOR_FIRE_IMPORT_SHORT_CIRCUIT = 0x415;
        public const int MINOR_FIRE_IMPORT_BROKEN_CIRCUIT = 0x416;
        public const int MINOR_FIRE_IMPORT_RESUME = 0x417;
        public const int MINOR_FIRE_BUTTON_TRIGGER = 0x418;
        public const int MINOR_FIRE_BUTTON_RESUME = 0x419;
        public const int MINOR_MAINTENANCE_BUTTON_TRIGGER = 0x41a;
        public const int MINOR_MAINTENANCE_BUTTON_RESUME = 0x41b;
        public const int MINOR_EMERGENCY_BUTTON_TRIGGER = 0x41c;
        public const int MINOR_EMERGENCY_BUTTON_RESUME = 0x41d;
        public const int MINOR_DISTRACT_CONTROLLER_ALARM = 0x41e;
        public const int MINOR_DISTRACT_CONTROLLER_RESUME = 0x41f;
        public const int MINOR_CHANNEL_CONTROLLER_DESMANTLE_ALARM = 0x422;
        public const int MINOR_CHANNEL_CONTROLLER_DESMANTLE_RESUME = 0x423;
        public const int MINOR_CHANNEL_CONTROLLER_FIRE_IMPORT_ALARM = 0x424;
        public const int MINOR_CHANNEL_CONTROLLER_FIRE_IMPORT_RESUME = 0x425;
        public const int MINOR_PRINTER_OUT_OF_PAPER = 0x440;
        public const int MINOR_LEGAL_EVENT_NEARLY_FULL = 0x442;
        public const int MAJOR_EXCEPTION = 2;
        public const int MINOR_NET_BROKEN = 0x27;
        public const int MINOR_RS485_DEVICE_ABNORMAL = 0x3a;
        public const int MINOR_RS485_DEVICE_REVERT = 0x3b;
        public const int MINOR_DEV_POWER_ON = 0x400;
        public const int MINOR_DEV_POWER_OFF = 0x401;
        public const int MINOR_WATCH_DOG_RESET = 0x402;
        public const int MINOR_LOW_BATTERY = 0x403;
        public const int MINOR_BATTERY_RESUME = 0x404;
        public const int MINOR_AC_OFF = 0x405;
        public const int MINOR_AC_RESUME = 0x406;
        public const int MINOR_NET_RESUME = 0x407;
        public const int MINOR_FLASH_ABNORMAL = 0x408;
        public const int MINOR_CARD_READER_OFFLINE = 0x409;
        public const int MINOR_CARD_READER_RESUME = 0x40a;
        public const int MINOR_INDICATOR_LIGHT_OFF = 0x40b;
        public const int MINOR_INDICATOR_LIGHT_RESUME = 0x40c;
        public const int MINOR_CHANNEL_CONTROLLER_OFF = 0x40d;
        public const int MINOR_CHANNEL_CONTROLLER_RESUME = 0x40e;
        public const int MINOR_SECURITY_MODULE_OFF = 0x40f;
        public const int MINOR_SECURITY_MODULE_RESUME = 0x410;
        public const int MINOR_BATTERY_ELECTRIC_LOW = 0x411;
        public const int MINOR_BATTERY_ELECTRIC_RESUME = 0x412;
        public const int MINOR_LOCAL_CONTROL_NET_BROKEN = 0x413;
        public const int MINOR_LOCAL_CONTROL_NET_RSUME = 0x414;
        public const int MINOR_MASTER_RS485_LOOPNODE_BROKEN = 0x415;
        public const int MINOR_MASTER_RS485_LOOPNODE_RESUME = 0x416;
        public const int MINOR_LOCAL_CONTROL_OFFLINE = 0x417;
        public const int MINOR_LOCAL_CONTROL_RESUME = 0x418;
        public const int MINOR_LOCAL_DOWNSIDE_RS485_LOOPNODE_BROKEN = 0x419;
        public const int MINOR_LOCAL_DOWNSIDE_RS485_LOOPNODE_RESUME = 0x41a;
        public const int MINOR_DISTRACT_CONTROLLER_ONLINE = 0x41b;
        public const int MINOR_DISTRACT_CONTROLLER_OFFLINE = 0x41c;
        public const int MINOR_ID_CARD_READER_NOT_CONNECT = 0x41d;
        public const int MINOR_ID_CARD_READER_RESUME = 0x41e;
        public const int MINOR_FINGER_PRINT_MODULE_NOT_CONNECT = 0x41f;
        public const int MINOR_FINGER_PRINT_MODULE_RESUME = 0x420;
        public const int MINOR_CAMERA_NOT_CONNECT = 0x421;
        public const int MINOR_CAMERA_RESUME = 0x422;
        public const int MINOR_COM_NOT_CONNECT = 0x423;
        public const int MINOR_COM_RESUME = 0x424;
        public const int MINOR_DEVICE_NOT_AUTHORIZE = 0x425;
        public const int MINOR_PEOPLE_AND_ID_CARD_DEVICE_ONLINE = 0x426;
        public const int MINOR_PEOPLE_AND_ID_CARD_DEVICE_OFFLINE = 0x427;
        public const int MINOR_LOCAL_LOGIN_LOCK = 0x428;
        public const int MINOR_LOCAL_LOGIN_UNLOCK = 0x429;
        public const int MINOR_SUBMARINEBACK_COMM_BREAK = 0x42a;
        public const int MINOR_SUBMARINEBACK_COMM_RESUME = 0x42b;
        public const int MINOR_MOTOR_SENSOR_EXCEPTION = 0x42c;
        public const int MINOR_CAN_BUS_EXCEPTION = 0x42d;
        public const int MINOR_CAN_BUS_RESUME = 0x42e;
        public const int MINOR_GATE_TEMPERATURE_OVERRUN = 0x42f;
        public const int MINOR_IR_EMITTER_EXCEPTION = 0x430;
        public const int MINOR_IR_EMITTER_RESUME = 0x431;
        public const int MINOR_LAMP_BOARD_COMM_EXCEPTION = 0x432;
        public const int MINOR_LAMP_BOARD_COMM_RESUME = 0x433;
        public const int MINOR_IR_ADAPTOR_COMM_EXCEPTION = 0x434;
        public const int MINOR_IR_ADAPTOR_COMM_RESUME = 0x435;
        public const int MINOR_PRINTER_ONLINE = 0x436;
        public const int MINOR_PRINTER_OFFLINE = 0x437;
        public const int MINOR_4G_MOUDLE_ONLINE = 0x438;
        public const int MINOR_4G_MOUDLE_OFFLINE = 0x439;
        public const int MAJOR_OPERATION = 3;
        public const int MINOR_LOCAL_UPGRADE = 90;
        public const int MINOR_REMOTE_LOGIN = 0x70;
        public const int MINOR_REMOTE_LOGOUT = 0x71;
        public const int MINOR_REMOTE_ARM = 0x79;
        public const int MINOR_REMOTE_DISARM = 0x7a;
        public const int MINOR_REMOTE_REBOOT = 0x7b;
        public const int MINOR_REMOTE_UPGRADE = 0x7e;
        public const int MINOR_REMOTE_CFGFILE_OUTPUT = 0x86;
        public const int MINOR_REMOTE_CFGFILE_INTPUT = 0x87;
        public const int MINOR_REMOTE_ALARMOUT_OPEN_MAN = 0xd6;
        public const int MINOR_REMOTE_ALARMOUT_CLOSE_MAN = 0xd7;
        public const int MINOR_REMOTE_OPEN_DOOR = 0x400;
        public const int MINOR_REMOTE_CLOSE_DOOR = 0x401;
        public const int MINOR_REMOTE_ALWAYS_OPEN = 0x402;
        public const int MINOR_REMOTE_ALWAYS_CLOSE = 0x403;
        public const int MINOR_REMOTE_CHECK_TIME = 0x404;
        public const int MINOR_NTP_CHECK_TIME = 0x405;
        public const int MINOR_REMOTE_CLEAR_CARD = 0x406;
        public const int MINOR_REMOTE_RESTORE_CFG = 0x407;
        public const int MINOR_ALARMIN_ARM = 0x408;
        public const int MINOR_ALARMIN_DISARM = 0x409;
        public const int MINOR_LOCAL_RESTORE_CFG = 0x40a;
        public const int MINOR_REMOTE_CAPTURE_PIC = 0x40b;
        public const int MINOR_MOD_NET_REPORT_CFG = 0x40c;
        public const int MINOR_MOD_GPRS_REPORT_PARAM = 0x40d;
        public const int MINOR_MOD_REPORT_GROUP_PARAM = 0x40e;
        public const int MINOR_UNLOCK_PASSWORD_OPEN_DOOR = 0x40f;
        public const int MINOR_AUTO_RENUMBER = 0x410;
        public const int MINOR_AUTO_COMPLEMENT_NUMBER = 0x411;
        public const int MINOR_NORMAL_CFGFILE_INPUT = 0x412;
        public const int MINOR_NORMAL_CFGFILE_OUTTPUT = 0x413;
        public const int MINOR_CARD_RIGHT_INPUT = 0x414;
        public const int MINOR_CARD_RIGHT_OUTTPUT = 0x415;
        public const int MINOR_LOCAL_USB_UPGRADE = 0x416;
        public const int MINOR_REMOTE_VISITOR_CALL_LADDER = 0x417;
        public const int MINOR_REMOTE_HOUSEHOLD_CALL_LADDER = 0x418;
        public const int MINOR_REMOTE_ACTUAL_GUARD = 0x419;
        public const int MINOR_REMOTE_ACTUAL_UNGUARD = 0x41a;
        public const int MINOR_REMOTE_CONTROL_NOT_CODE_OPER_FAILED = 0x41b;
        public const int MINOR_REMOTE_CONTROL_CLOSE_DOOR = 0x41c;
        public const int MINOR_REMOTE_CONTROL_OPEN_DOOR = 0x41d;
        public const int MINOR_REMOTE_CONTROL_ALWAYS_OPEN_DOOR = 0x41e;
        public const int MAJOR_EVENT = 5;
        public const int MINOR_LEGAL_CARD_PASS = 1;
        public const int MINOR_CARD_AND_PSW_PASS = 2;
        public const int MINOR_CARD_AND_PSW_FAIL = 3;
        public const int MINOR_CARD_AND_PSW_TIMEOUT = 4;
        public const int MINOR_CARD_AND_PSW_OVER_TIME = 5;
        public const int MINOR_CARD_NO_RIGHT = 6;
        public const int MINOR_CARD_INVALID_PERIOD = 7;
        public const int MINOR_CARD_OUT_OF_DATE = 8;
        public const int MINOR_INVALID_CARD = 9;
        public const int MINOR_ANTI_SNEAK_FAIL = 10;
        public const int MINOR_INTERLOCK_DOOR_NOT_CLOSE = 11;
        public const int MINOR_NOT_BELONG_MULTI_GROUP = 12;
        public const int MINOR_INVALID_MULTI_VERIFY_PERIOD = 13;
        public const int MINOR_MULTI_VERIFY_SUPER_RIGHT_FAIL = 14;
        public const int MINOR_MULTI_VERIFY_REMOTE_RIGHT_FAIL = 15;
        public const int MINOR_MULTI_VERIFY_SUCCESS = 0x10;
        public const int MINOR_LEADER_CARD_OPEN_BEGIN = 0x11;
        public const int MINOR_LEADER_CARD_OPEN_END = 0x12;
        public const int MINOR_ALWAYS_OPEN_BEGIN = 0x13;
        public const int MINOR_ALWAYS_OPEN_END = 20;
        public const int MINOR_LOCK_OPEN = 0x15;
        public const int MINOR_LOCK_CLOSE = 0x16;
        public const int MINOR_DOOR_BUTTON_PRESS = 0x17;
        public const int MINOR_DOOR_BUTTON_RELEASE = 0x18;
        public const int MINOR_DOOR_OPEN_NORMAL = 0x19;
        public const int MINOR_DOOR_CLOSE_NORMAL = 0x1a;
        public const int MINOR_DOOR_OPEN_ABNORMAL = 0x1b;
        public const int MINOR_DOOR_OPEN_TIMEOUT = 0x1c;
        public const int MINOR_ALARMOUT_ON = 0x1d;
        public const int MINOR_ALARMOUT_OFF = 30;
        public const int MINOR_ALWAYS_CLOSE_BEGIN = 0x1f;
        public const int MINOR_ALWAYS_CLOSE_END = 0x20;
        public const int MINOR_MULTI_VERIFY_NEED_REMOTE_OPEN = 0x21;
        public const int MINOR_MULTI_VERIFY_SUPERPASSWD_VERIFY_SUCCESS = 0x22;
        public const int MINOR_MULTI_VERIFY_REPEAT_VERIFY = 0x23;
        public const int MINOR_MULTI_VERIFY_TIMEOUT = 0x24;
        public const int MINOR_DOORBELL_RINGING = 0x25;
        public const int MINOR_FINGERPRINT_COMPARE_PASS = 0x26;
        public const int MINOR_FINGERPRINT_COMPARE_FAIL = 0x27;
        public const int MINOR_CARD_FINGERPRINT_VERIFY_PASS = 40;
        public const int MINOR_CARD_FINGERPRINT_VERIFY_FAIL = 0x29;
        public const int MINOR_CARD_FINGERPRINT_VERIFY_TIMEOUT = 0x2a;
        public const int MINOR_CARD_FINGERPRINT_PASSWD_VERIFY_PASS = 0x2b;
        public const int MINOR_CARD_FINGERPRINT_PASSWD_VERIFY_FAIL = 0x2c;
        public const int MINOR_CARD_FINGERPRINT_PASSWD_VERIFY_TIMEOUT = 0x2d;
        public const int MINOR_FINGERPRINT_PASSWD_VERIFY_PASS = 0x2e;
        public const int MINOR_FINGERPRINT_PASSWD_VERIFY_FAIL = 0x2f;
        public const int MINOR_FINGERPRINT_PASSWD_VERIFY_TIMEOUT = 0x30;
        public const int MINOR_FINGERPRINT_INEXISTENCE = 0x31;
        public const int MINOR_CARD_PLATFORM_VERIFY = 50;
        public const int MINOR_CALL_CENTER = 0x33;
        public const int MINOR_FIRE_RELAY_TURN_ON_DOOR_ALWAYS_OPEN = 0x34;
        public const int MINOR_FIRE_RELAY_RECOVER_DOOR_RECOVER_NORMAL = 0x35;
        public const int MINOR_FACE_AND_FP_VERIFY_PASS = 0x36;
        public const int MINOR_FACE_AND_FP_VERIFY_FAIL = 0x37;
        public const int MINOR_FACE_AND_FP_VERIFY_TIMEOUT = 0x38;
        public const int MINOR_FACE_AND_PW_VERIFY_PASS = 0x39;
        public const int MINOR_FACE_AND_PW_VERIFY_FAIL = 0x3a;
        public const int MINOR_FACE_AND_PW_VERIFY_TIMEOUT = 0x3b;
        public const int MINOR_FACE_AND_CARD_VERIFY_PASS = 60;
        public const int MINOR_FACE_AND_CARD_VERIFY_FAIL = 0x3d;
        public const int MINOR_FACE_AND_CARD_VERIFY_TIMEOUT = 0x3e;
        public const int MINOR_FACE_AND_PW_AND_FP_VERIFY_PASS = 0x3f;
        public const int MINOR_FACE_AND_PW_AND_FP_VERIFY_FAIL = 0x40;
        public const int MINOR_FACE_AND_PW_AND_FP_VERIFY_TIMEOUT = 0x41;
        public const int MINOR_FACE_CARD_AND_FP_VERIFY_PASS = 0x42;
        public const int MINOR_FACE_CARD_AND_FP_VERIFY_FAIL = 0x43;
        public const int MINOR_FACE_CARD_AND_FP_VERIFY_TIMEOUT = 0x44;
        public const int MINOR_EMPLOYEENO_AND_FP_VERIFY_PASS = 0x45;
        public const int MINOR_EMPLOYEENO_AND_FP_VERIFY_FAIL = 70;
        public const int MINOR_EMPLOYEENO_AND_FP_VERIFY_TIMEOUT = 0x47;
        public const int MINOR_EMPLOYEENO_AND_FP_AND_PW_VERIFY_PASS = 0x48;
        public const int MINOR_EMPLOYEENO_AND_FP_AND_PW_VERIFY_FAIL = 0x49;
        public const int MINOR_EMPLOYEENO_AND_FP_AND_PW_VERIFY_TIMEOUT = 0x4a;
        public const int MINOR_FACE_VERIFY_PASS = 0x4b;
        public const int MINOR_FACE_VERIFY_FAIL = 0x4c;
        public const int MINOR_EMPLOYEENO_AND_FACE_VERIFY_PASS = 0x4d;
        public const int MINOR_EMPLOYEENO_AND_FACE_VERIFY_FAIL = 0x4e;
        public const int MINOR_EMPLOYEENO_AND_FACE_VERIFY_TIMEOUT = 0x4f;
        public const int MINOR_FACE_RECOGNIZE_FAIL = 80;
        public const int MINOR_FIRSTCARD_AUTHORIZE_BEGIN = 0x51;
        public const int MINOR_FIRSTCARD_AUTHORIZE_END = 0x52;
        public const int MINOR_DOORLOCK_INPUT_SHORT_CIRCUIT = 0x53;
        public const int MINOR_DOORLOCK_INPUT_BROKEN_CIRCUIT = 0x54;
        public const int MINOR_DOORLOCK_INPUT_EXCEPTION = 0x55;
        public const int MINOR_DOORCONTACT_INPUT_SHORT_CIRCUIT = 0x56;
        public const int MINOR_DOORCONTACT_INPUT_BROKEN_CIRCUIT = 0x57;
        public const int MINOR_DOORCONTACT_INPUT_EXCEPTION = 0x58;
        public const int MINOR_OPENBUTTON_INPUT_SHORT_CIRCUIT = 0x59;
        public const int MINOR_OPENBUTTON_INPUT_BROKEN_CIRCUIT = 90;
        public const int MINOR_OPENBUTTON_INPUT_EXCEPTION = 0x5b;
        public const int MINOR_DOORLOCK_OPEN_EXCEPTION = 0x5c;
        public const int MINOR_DOORLOCK_OPEN_TIMEOUT = 0x5d;
        public const int MINOR_FIRSTCARD_OPEN_WITHOUT_AUTHORIZE = 0x5e;
        public const int MINOR_CALL_LADDER_RELAY_BREAK = 0x5f;
        public const int MINOR_CALL_LADDER_RELAY_CLOSE = 0x60;
        public const int MINOR_AUTO_KEY_RELAY_BREAK = 0x61;
        public const int MINOR_AUTO_KEY_RELAY_CLOSE = 0x62;
        public const int MINOR_KEY_CONTROL_RELAY_BREAK = 0x63;
        public const int MINOR_KEY_CONTROL_RELAY_CLOSE = 100;
        public const int MINOR_EMPLOYEENO_AND_PW_PASS = 0x65;
        public const int MINOR_EMPLOYEENO_AND_PW_FAIL = 0x66;
        public const int MINOR_EMPLOYEENO_AND_PW_TIMEOUT = 0x67;
        public const int MINOR_HUMAN_DETECT_FAIL = 0x68;
        public const int MINOR_PEOPLE_AND_ID_CARD_COMPARE_PASS = 0x69;
        public const int MINOR_PEOPLE_AND_ID_CARD_COMPARE_FAIL = 0x70;
        public const int MINOR_CERTIFICATE_BLACK_LIST = 0x71;
        public const int MINOR_LEGAL_MESSAGE = 0x72;
        public const int MINOR_ILLEGAL_MESSAGE = 0x73;
        public const int MINOR_MAC_DETECT = 0x74;
        public const int MINOR_DOOR_OPEN_OR_DORMANT_FAIL = 0x75;
        public const int MINOR_AUTH_PLAN_DORMANT_FAIL = 0x76;
        public const int MINOR_CARD_ENCRYPT_VERIFY_FAIL = 0x77;
        public const int MINOR_SUBMARINEBACK_REPLY_FAIL = 120;
        public const int MINOR_DOOR_OPEN_OR_DORMANT_OPEN_FAIL = 130;
        public const int MINOR_DOOR_OPEN_OR_DORMANT_LINKAGE_OPEN_FAIL = 0x84;
        public const int MINOR_TRAILING = 0x85;
        public const int MINOR_HEART_BEAT = 0x83;
        public const int MINOR_REVERSE_ACCESS = 0x86;
        public const int MINOR_FORCE_ACCESS = 0x87;
        public const int MINOR_CLIMBING_OVER_GATE = 0x88;
        public const int MINOR_PASSING_TIMEOUT = 0x89;
        public const int MINOR_INTRUSION_ALARM = 0x8a;
        public const int MINOR_FREE_GATE_PASS_NOT_AUTH = 0x8b;
        public const int MINOR_DROP_ARM_BLOCK = 140;
        public const int MINOR_DROP_ARM_BLOCK_RESUME = 0x8d;
        public const int MINOR_LOCAL_FACE_MODELING_FAIL = 0x8e;
        public const int MINOR_STAY_EVENT = 0x8f;
        public const int MINOR_PASSWORD_MISMATCH = 0x97;
        public const int MINOR_EMPLOYEE_NO_NOT_EXIST = 0x98;
        public const int MINOR_COMBINED_VERIFY_PASS = 0x99;
        public const int MINOR_COMBINED_VERIFY_TIMEOUT = 0x9a;
        public const int MINOR_VERIFY_MODE_MISMATCH = 0x9b;
        public const int CARD_PARAM_CARD_VALID = 1;
        public const int CARD_PARAM_VALID = 2;
        public const int CARD_PARAM_CARD_TYPE = 4;
        public const int CARD_PARAM_DOOR_RIGHT = 8;
        public const int CARD_PARAM_LEADER_CARD = 0x10;
        public const int CARD_PARAM_SWIPE_NUM = 0x20;
        public const int CARD_PARAM_GROUP = 0x40;
        public const int CARD_PARAM_PASSWORD = 0x80;
        public const int CARD_PARAM_RIGHT_PLAN = 0x100;
        public const int CARD_PARAM_SWIPED_NUM = 0x200;
        public const int CARD_PARAM_EMPLOYEE_NO = 0x400;
        public const int ACS_CARD_NO_LEN = 0x20;
        public const int MAX_DOOR_NUM_256 = 0x100;
        public const int MAX_GROUP_NUM_128 = 0x80;
        public const int CARD_PASSWORD_LEN = 8;
        public const int MAX_CARD_RIGHT_PLAN_NUM = 4;
        public const int MAX_DOOR_CODE_LEN = 8;
        public const int MAX_LOCK_CODE_LEN = 8;
        public const int MAX_CASE_SENSOR_NUM = 8;
        public const int MAX_CARD_READER_NUM_512 = 0x200;
        public const int MAX_ALARMHOST_ALARMIN_NUM = 0x200;
        public const int MAX_ALARMHOST_ALARMOUT_NUM = 0x200;
        public const int NET_DVR_GET_ACS_WORK_STATUS_V50 = 0x884;
        public const int NET_DVR_GET_CARD_CFG_V50 = 0x882;
        public const int NET_DVR_SET_CARD_CFG_V50 = 0x883;
        public const int NET_DVR_GET_TIMECFG = 0x76;
        public const int NET_DVR_SET_TIMECFG = 0x77;
        public const int NET_DVR_GET_AUDIOIN_VOLUME_CFG = 0x18d3;
        public const int NET_DVR_SET_AUDIOIN_VOLUME_CFG = 0x18d4;
        public const int NET_DVR_GET_AUDIOOUT_VOLUME_CFG = 0x18e1;
        public const int NET_DVR_SET_AUDIOOUT_VOLUME_CFG = 0x18e2;
        public const int DOOR_NAME_LEN = 0x20;
        public const int STRESS_PASSWORD_LEN = 8;
        public const int SUPER_PASSWORD_LEN = 8;
        public const int UNLOCK_PASSWORD_LEN = 8;
        public const int MAX_DOOR_NUM = 0x20;
        public const int MAX_GROUP_NUM = 0x20;
        public const int LOCAL_CONTROLLER_NAME_LEN = 0x20;
        public const int NET_DVR_GET_DOOR_CFG = 0x83c;
        public const int NET_DVR_SET_DOOR_CFG = 0x83d;
        public const int NET_SDK_MONITOR_ID_LEN = 0x40;
        public const int WM_MSG_ADD_ACS_EVENT_TOLIST = 0x3ea;
        public const int WM_MSG_GET_ACS_EVENT_FINISH = 0x3eb;
        public const int GROUP_NAME_LEN = 0x20;
        public const int NET_DVR_GET_GROUP_CFG = 0x840;
        public const int NET_DVR_SET_GROUP_CFG = 0x841;
        public const int MAX_ALARMHOST_VIDEO_CHAN = 0x40;
        public const int NET_DVR_GET_DEVICECFG_V40 = 0x44c;
        public const int NET_DVR_SET_DEVICECFG_V40 = 0x44d;
        public const int CARD_READER_DESCRIPTION = 0x20;
        public const int NET_DVR_GET_CARD_READER_CFG_V50 = 0x9c9;
        public const int NET_DVR_SET_CARD_READER_CFG_V50 = 0x9ca;
        public const int MAX_FACE_NUM = 2;
        public const int NET_DVR_GET_FACE_PARAM_CFG = 0x9cb;
        public const int NET_DVR_SET_FACE_PARAM_CFG = 0x9cc;
        public const int NET_DVR_DEL_FACE_PARAM_CFG = 0x9cd;
        public const int NET_DVR_CAPTURE_FACE_INFO = 0x9ce;
        public const int MAX_FINGER_PRINT_LEN = 0x300;
        public const int MAX_FINGER_PRINT_NUM = 10;
        public const int ERROR_MSG_LEN = 0x20;
        public const int NET_SDK_EMPLOYEE_NO_LEN = 0x20;
        public const int NET_DVR_GET_FINGERPRINT_CFG = 0x866;
        public const int NET_DVR_SET_FINGERPRINT_CFG = 0x867;
        public const int NET_DVR_DEL_FINGERPRINT_CFG = 0x868;
        public const int NET_DVR_GET_FINGERPRINT_CFG_V50 = 0x887;
        public const int NET_DVR_SET_FINGERPRINT_CFG_V50 = 0x888;
        public const int MAX_DAYS = 7;
        public const int MAX_TIMESEGMENT_V30 = 8;
        public const int HOLIDAY_GROUP_NAME_LEN = 0x20;
        public const int MAX_HOLIDAY_PLAN_NUM = 0x10;
        public const int TEMPLATE_NAME_LEN = 0x20;
        public const int MAX_HOLIDAY_GROUP_NUM = 0x10;
        public const int NET_DVR_GET_WEEK_PLAN_CFG = 0x834;
        public const int NET_DVR_SET_WEEK_PLAN_CFG = 0x835;
        public const int NET_DVR_GET_DOOR_STATUS_HOLIDAY_PLAN = 0x836;
        public const int NET_DVR_SET_DOOR_STATUS_HOLIDAY_PLAN = 0x837;
        public const int NET_DVR_GET_DOOR_STATUS_HOLIDAY_GROUP = 0x838;
        public const int NET_DVR_SET_DOOR_STATUS_HOLIDAY_GROUP = 0x839;
        public const int NET_DVR_GET_DOOR_STATUS_PLAN_TEMPLATE = 0x83a;
        public const int NET_DVR_SET_DOOR_STATUS_PLAN_TEMPLATE = 0x83b;
        public const int NET_DVR_GET_VERIFY_WEEK_PLAN = 0x84c;
        public const int NET_DVR_SET_VERIFY_WEEK_PLAN = 0x84d;
        public const int NET_DVR_GET_CARD_RIGHT_WEEK_PLAN = 0x84e;
        public const int NET_DVR_SET_CARD_RIGHT_WEEK_PLAN = 0x84f;
        public const int NET_DVR_GET_VERIFY_HOLIDAY_PLAN = 0x850;
        public const int NET_DVR_SET_VERIFY_HOLIDAY_PLAN = 0x851;
        public const int NET_DVR_GET_CARD_RIGHT_HOLIDAY_PLAN = 0x852;
        public const int NET_DVR_SET_CARD_RIGHT_HOLIDAY_PLAN = 0x853;
        public const int NET_DVR_GET_VERIFY_HOLIDAY_GROUP = 0x854;
        public const int NET_DVR_SET_VERIFY_HOLIDAY_GROUP = 0x855;
        public const int NET_DVR_GET_CARD_RIGHT_HOLIDAY_GROUP = 0x856;
        public const int NET_DVR_SET_CARD_RIGHT_HOLIDAY_GROUP = 0x857;
        public const int NET_DVR_GET_VERIFY_PLAN_TEMPLATE = 0x858;
        public const int NET_DVR_SET_VERIFY_PLAN_TEMPLATE = 0x859;
        public const int NET_DVR_GET_CARD_RIGHT_PLAN_TEMPLATE = 0x85a;
        public const int NET_DVR_SET_CARD_RIGHT_PLAN_TEMPLATE = 0x85b;
        public const int NET_DVR_GET_CARD_RIGHT_WEEK_PLAN_V50 = 0x900;
        public const int NET_DVR_SET_CARD_RIGHT_WEEK_PLAN_V50 = 0x901;
        public const int NET_DVR_GET_CARD_RIGHT_HOLIDAY_PLAN_V50 = 0x906;
        public const int NET_DVR_SET_CARD_RIGHT_HOLIDAY_PLAN_V50 = 0x907;
        public const int NET_DVR_GET_CARD_RIGHT_HOLIDAY_GROUP_V50 = 0x90c;
        public const int NET_DVR_SET_CARD_RIGHT_HOLIDAY_GROUP_V50 = 0x90d;
        public const int NET_DVR_GET_CARD_RIGHT_PLAN_TEMPLATE_V50 = 0x912;
        public const int NET_DVR_SET_CARD_RIGHT_PLAN_TEMPLATE_V50 = 0x913;
        public const int NET_DVR_GET_DOOR_STATUS_PLAN = 0x83e;
        public const int NET_DVR_SET_DOOR_STATUS_PLAN = 0x83f;
        public const int NET_DVR_GET_CARD_READER_PLAN = 0x85e;
        public const int NET_DVR_SET_CARD_READER_PLAN = 0x85f;
        public const int NET_DVR_GET_CARD_USERINFO_CFG = 0x873;
        public const int NET_DVR_SET_CARD_USERINFO_CFG = 0x874;
        public const int NET_DVR_GET_EVENT_CARD_LINKAGE_CFG_V50 = 0x885;
        public const int NET_DVR_SET_EVENT_CARD_LINKAGE_CFG_V50 = 0x886;
        public const int NET_DVR_DEL_FINGERPRINT_CFG_V50 = 0x9d5;
        public const int NET_DVR_GET_EVENT_CARD_LINKAGE_CFG_V51 = 0x9d6;
        public const int NET_DVR_SET_EVENT_CARD_LINKAGE_CFG_V51 = 0x9d7;
        public const int NET_DVR_JSON_CONFIG = 0x9f6;
        public const int NET_DVR_FACE_DATA_RECORD = 0x9f7;
        public const int NET_DVR_FACE_DATA_SEARCH = 0x9f8;
        public const int NET_DVR_FACE_DATA_MODIFY = 0x9f9;
        public const int NET_DVR_GET_NETCFG_V30 = 0x3e8;
        public const int NET_DVR_SET_NETCFG_V30 = 0x3e9;
        public const int NET_DVR_GET_NETCFG_V50 = 0x3f7;
        public const int NET_DVR_SET_NETCFG_V50 = 0x3f8;
        public const int NET_DVR_VIDEO_CALL_SIGNAL_PROCESS = 0x3ea0;
        public const int WM_MSG_SET_FACE_PARAM_FINISH = 0x3ea;
        public const int WM_MSG_GET_FACE_PARAM_FINISH = 0x3eb;
        public const int WM_MSG_ADD_FACE_PARAM_TOLIST = 0x3ec;
        public const int NET_DVR_GET_IPPARACFG_V40 = 0x426;
        public const int NET_DVR_SET_IPPARACFG_V40 = 0x427;
        public const int NET_DVR_GET_CARD = 0xa00;
        public const int NET_DVR_SET_CARD = 0xa01;
        public const int NET_DVR_DEL_CARD = 0xa02;
        public const int NET_DVR_GET_FINGERPRINT = 0xa03;
        public const int NET_DVR_SET_FINGERPRINT = 0xa04;
        public const int NET_DVR_DEL_FINGERPRINT = 0xa05;
        public const int NET_DVR_GET_FACE = 0xa06;
        public const int NET_DVR_SET_FACE = 0xa07;

        [DllImport(@"HCNetSDK\HCNetSDK.dll")]
        public static extern bool NET_DVR_CaptureJPEGPicture(int lUserID, int lChannel, ref NET_DVR_JPEGPARA lpJpegPara, IntPtr sPicFileName);
        [DllImport(@"HCNetSDK\HCNetSDK.dll")]
        public static extern bool NET_DVR_Cleanup();
        [DllImport(@"HCNetSDK\HCNetSDK.dll")]
        public static extern bool NET_DVR_CloseAlarmChan(int lAlarmHandle);
        [DllImport(@"HCNetSDK\HCNetSDK.dll")]
        public static extern bool NET_DVR_CloseAlarmChan_V30(int lAlarmHandle);
        [DllImport(@"HCNetSDK\HCNetSDK.dll")]
        public static extern int NET_DVR_CloseUpgradeHandle(int lUpgradeHandle);
        [DllImport(@"HCNetSDK\HCNetSDK.dll")]
        public static extern bool NET_DVR_ControlGateway(int lUserID, int lGatewayIndex, uint dwStaic);
        [DllImport(@"HCNetSDK\HCNetSDK.dll")]
        public static extern bool NET_DVR_GetAlarmDeviceUser(int lUserID, int lUserIndex, ref NET_DVR_ALARM_DEVICE_USER lpDeviceUser);
        [DllImport(@"HCNetSDK\HCNetSDK.dll")]
        public static extern bool NET_DVR_GetDeviceAbility(int lUserID, uint dwAbilityType, IntPtr pInBuf, uint dwInLength, IntPtr pOutBuf, uint dwOutLength);
        [DllImport(@"HCNetSDK\HCNetSDK.dll")]
        public static extern bool NET_DVR_GetDeviceConfig(int lUserID, uint dwCommand, uint dwCount, IntPtr lpInBuffer, uint dwInBufferSize, IntPtr lpStatusList, IntPtr lpOutBuffer, uint dwOutBufferSize);
        [DllImport(@"HCNetSDK\HCNetSDK.dll")]
        public static extern bool NET_DVR_GetDVRConfig(int lUserID, uint dwCommand, int lChannel, IntPtr lpOutBuffer, uint dwOutBufferSize, ref uint lpBytesReturned);
        [DllImport(@"HCNetSDK\HCNetSDK.dll")]
        public static extern IntPtr NET_DVR_GetErrorMsg(ref int pErrorNo);
        [DllImport(@"HCNetSDK\HCNetSDK.dll")]
        public static extern uint NET_DVR_GetLastError();
        [DllImport(@"HCNetSDK\HCNetSDK.dll")]
        public static extern int NET_DVR_GetNextRemoteConfig(int lHandle, IntPtr lpOutBuff, uint dwOutBuffSize);
        [DllImport(@"HCNetSDK\HCNetSDK.dll")]
        public static extern bool NET_DVR_GetRemoteConfigState(int lHandle, IntPtr pState);
        [DllImport(@"HCNetSDK\HCNetSDK.dll")]
        public static extern uint NET_DVR_GetSDKBuildVersion();
        [DllImport(@"HCNetSDK\HCNetSDK.dll")]
        public static extern uint NET_DVR_GetSDKVersion();
        [DllImport(@"HCNetSDK\HCNetSDK.dll")]
        public static extern int NET_DVR_GetUpgradeProgress(int lUpgradeHandle);
        [DllImport(@"HCNetSDK\HCNetSDK.dll")]
        public static extern bool NET_DVR_Init();
        [DllImport(@"HCNetSDK\HCNetSDK.dll")]
        public static extern int NET_DVR_Login_V40(ref NET_DVR_USER_LOGIN_INFO pLoginInfo, ref NET_DVR_DEVICEINFO_V40 lpDeviceInfo);
        [DllImport(@"HCNetSDK\HCNetSDK.dll")]
        public static extern bool NET_DVR_Logout_V30(int lUserID);
        [DllImport(@"HCNetSDK\HCNetSDK.dll")]
        public static extern int NET_DVR_RealPlay_V30(int iUserID, ref NET_DVR_CLIENTINFO lpClientInfo, REALDATACALLBACK fRealDataCallBack_V30, IntPtr pUser, uint bBlocked);
        [DllImport(@"HCNetSDK\HCNetSDK.dll")]
        public static extern int NET_DVR_RealPlay_V40(int lUserID, ref NET_DVR_PREVIEWINFO lpPreviewInfo, RealDataCallBack fRealDataCallBack_V30, IntPtr pUser);
        [DllImport(@"HCNetSDK\HCNetSDK.dll")]
        public static extern bool NET_DVR_RemoteControl(int lUserID, uint dwCommand, IntPtr lpInBuffer, uint dwInBufferSize);
        [DllImport(@"HCNetSDK\HCNetSDK.dll")]
        public static extern bool NET_DVR_SendRemoteConfig(int lHandle, uint dwDataType, IntPtr pSendBuf, uint dwBufSize);
        [DllImport(@"HCNetSDK\HCNetSDK.dll")]
        public static extern int NET_DVR_SendWithRecvRemoteConfig(int lHandle, IntPtr lpInBuff, uint dwInBuffSize, IntPtr lpOutBuff, uint dwOutBuffSize, ref uint dwOutDataLen);
        [DllImport(@"HCNetSDK\HCNetSDK.dll")]
        public static extern bool NET_DVR_SetAlarmDeviceUser(int lUserID, int lUserIndex, ref NET_DVR_ALARM_DEVICE_USER lpDeviceUser);
        [DllImport(@"HCNetSDK\HCNetSDK.dll")]
        public static extern bool NET_DVR_SetDeviceConfig(int lUserID, uint dwCommand, uint dwCount, IntPtr lpInBuffer, uint dwInBufferSize, IntPtr lpStatusList, IntPtr lpInParamBuffer, uint dwInParamBufferSize);
        [DllImport(@"HCNetSDK\HCNetSDK.dll")]
        public static extern bool NET_DVR_SetDVRConfig(int lUserID, uint dwCommand, int lChannel, IntPtr lpInBuffer, uint dwInBufferSize);
        [DllImport(@"HCNetSDK\HCNetSDK.dll")]
        public static extern bool NET_DVR_SetDVRMessageCallBack_V31(MSGCallBack_V31 fMessageCallBack, IntPtr pUser);
        [DllImport(@"HCNetSDK\HCNetSDK.dll")]
        public static extern bool NET_DVR_SetDVRMessageCallBack_V50(int iIndex, MSGCallBack fMessageCallBack, IntPtr pUser);
        [DllImport(@"HCNetSDK\HCNetSDK.dll")]
        public static extern bool NET_DVR_SetLogToFile(int nLogLevel, string strLogDir, bool bAutoDel);
        [DllImport(@"HCNetSDK\HCNetSDK.dll")]
        public static extern int NET_DVR_SetupAlarmChan(int lUserID);
        [DllImport(@"HCNetSDK\HCNetSDK.dll")]
        public static extern int NET_DVR_SetupAlarmChan_V30(int lUserID);
        [DllImport(@"HCNetSDK\HCNetSDK.dll")]
        public static extern int NET_DVR_SetupAlarmChan_V41(int lUserID, ref NET_DVR_SETUPALARM_PARAM lpSetupParam);
        [DllImport(@"HCNetSDK\HCNetSDK.dll")]
        public static extern bool NET_DVR_SetVoiceComClientVolume(int lVoiceComHandle, ushort wVolume);
        [DllImport(@"HCNetSDK\HCNetSDK.dll")]
        public static extern int NET_DVR_StartRemoteConfig(int lUserID, uint dwCommand, IntPtr lpInBuffer, int dwInBufferLen, RemoteConfigCallback cbStateCallback, IntPtr pUserData);
        [DllImport(@"HCNetSDK\HCNetSDK.dll")]
        public static extern int NET_DVR_StartVoiceCom_V30(int lUserID, uint dwVoiceChan, bool bNeedCBNoEncData, VOICEDATACALLBACKV30 fVoiceDataCallBack, IntPtr pUser);
        [DllImport(@"HCNetSDK\HCNetSDK.dll")]
        public static extern bool NET_DVR_STDXMLConfig(int lUserID, IntPtr lpInputParam, IntPtr lpOutputParam);
        [DllImport(@"HCNetSDK\HCNetSDK.dll")]
        public static extern bool NET_DVR_StopRealPlay(int iRealHandle);
        [DllImport(@"HCNetSDK\HCNetSDK.dll")]
        public static extern bool NET_DVR_StopRemoteConfig(int lHandle);
        [DllImport(@"HCNetSDK\HCNetSDK.dll")]
        public static extern bool NET_DVR_StopVoiceCom(int lVoiceComHandle);
        [DllImport(@"HCNetSDK\HCNetSDK.dll")]
        public static extern int NET_DVR_Upgrade_V40(int lUserID, uint dwUpgradeType, string sFileName, IntPtr pInbuffer, int dwInBufferLen);
        [DllImport("User32.dll")]
        public static extern int PostMessage(IntPtr hWnd, int Msg, int wParam, int lParam);

        public enum ACS_ALARM_SUBEVENT_ENUM
        {
            EVENT_ACS_ALARMIN_SHORT_CIRCUIT,
            EVENT_ACS_ALARMIN_BROKEN_CIRCUIT,
            EVENT_ACS_ALARMIN_EXCEPTION,
            EVENT_ACS_ALARMIN_RESUME,
            EVENT_ACS_CASE_SENSOR_ALARM,
            EVENT_ACS_CASE_SENSOR_RESUME
        }

        public enum ACS_CARD_READER_SUBEVENT_ENUM
        {
            EVENT_ACS_STRESS_ALARM,
            EVENT_ACS_CARD_READER_DESMANTLE_ALARM,
            EVENT_ACS_LEGAL_CARD_PASS,
            EVENT_ACS_CARD_AND_PSW_PASS,
            EVENT_ACS_CARD_AND_PSW_FAIL,
            EVENT_ACS_CARD_AND_PSW_TIMEOUT,
            EVENT_ACS_CARD_MAX_AUTHENTICATE_FAIL,
            EVENT_ACS_CARD_NO_RIGHT,
            EVENT_ACS_CARD_INVALID_PERIOD,
            EVENT_ACS_CARD_OUT_OF_DATE,
            EVENT_ACS_INVALID_CARD,
            EVENT_ACS_ANTI_SNEAK_FAIL,
            EVENT_ACS_INTERLOCK_DOOR_NOT_CLOSE,
            EVENT_ACS_FINGERPRINT_COMPARE_PASS,
            EVENT_ACS_FINGERPRINT_COMPARE_FAIL,
            EVENT_ACS_CARD_FINGERPRINT_VERIFY_PASS,
            EVENT_ACS_CARD_FINGERPRINT_VERIFY_FAIL,
            EVENT_ACS_CARD_FINGERPRINT_VERIFY_TIMEOUT,
            EVENT_ACS_CARD_FINGERPRINT_PASSWD_VERIFY_PASS,
            EVENT_ACS_CARD_FINGERPRINT_PASSWD_VERIFY_FAIL,
            EVENT_ACS_CARD_FINGERPRINT_PASSWD_VERIFY_TIMEOUT,
            EVENT_ACS_FINGERPRINT_PASSWD_VERIFY_PASS,
            EVENT_ACS_FINGERPRINT_PASSWD_VERIFY_FAIL,
            EVENT_ACS_FINGERPRINT_PASSWD_VERIFY_TIMEOUT,
            EVENT_ACS_FINGERPRINT_INEXISTENCE,
            EVENT_ACS_FACE_VERIFY_PASS,
            EVENT_ACS_FACE_VERIFY_FAIL,
            EVENT_ACS_FACE_AND_FP_VERIFY_PASS,
            EVENT_ACS_FACE_AND_FP_VERIFY_FAIL,
            EVENT_ACS_FACE_AND_FP_VERIFY_TIMEOUT,
            EVENT_ACS_FACE_AND_PW_VERIFY_PASS,
            EVENT_ACS_FACE_AND_PW_VERIFY_FAIL,
            EVENT_ACS_FACE_AND_PW_VERIFY_TIMEOUT,
            EVENT_ACS_FACE_AND_CARD_VERIFY_PASS,
            EVENT_ACS_FACE_AND_CARD_VERIFY_FAIL,
            EVENT_ACS_FACE_AND_CARD_VERIFY_TIMEOUT,
            EVENT_ACS_FACE_AND_PW_AND_FP_VERIFY_PASS,
            EVENT_ACS_FACE_AND_PW_AND_FP_VERIFY_FAIL,
            EVENT_ACS_FACE_AND_PW_AND_FP_VERIFY_TIMEOUT,
            EVENT_ACS_FACE_AND_CARD_AND_FP_VERIFY_PASS,
            EVENT_ACS_FACE_AND_CARD_AND_FP_VERIFY_FAIL,
            EVENT_ACS_FACE_AND_CARD_AND_FP_VERIFY_TIMEOUT,
            EVENT_ACS_EMPLOYEENO_AND_FP_VERIFY_PASS,
            EVENT_ACS_EMPLOYEENO_AND_FP_VERIFY_FAIL,
            EVENT_ACS_EMPLOYEENO_AND_FP_VERIFY_TIMEOUT,
            EVENT_ACS_EMPLOYEENO_AND_FP_AND_PW_VERIFY_PASS,
            EVENT_ACS_EMPLOYEENO_AND_FP_AND_PW_VERIFY_FAIL,
            EVENT_ACS_EMPLOYEENO_AND_FP_AND_PW_VERIFY_TIMEOUT,
            EVENT_ACS_EMPLOYEENO_AND_FACE_VERIFY_PASS,
            EVENT_ACS_EMPLOYEENO_AND_FACE_VERIFY_FAIL,
            EVENT_ACS_EMPLOYEENO_AND_FACE_VERIFY_TIMEOUT,
            EVENT_ACS_FACE_RECOGNIZE_FAIL,
            EVENT_ACS_EMPLOYEENO_AND_PW_PASS,
            EVENT_ACS_EMPLOYEENO_AND_PW_FAIL,
            EVENT_ACS_EMPLOYEENO_AND_PW_TIMEOUT,
            EVENT_ACS_HUMAN_DETECT_FAIL
        }

        public enum ACS_DEV_SUBEVENT_ENUM
        {
            EVENT_ACS_HOST_ANTI_DISMANTLE,
            EVENT_ACS_OFFLINE_ECENT_NEARLY_FULL,
            EVENT_ACS_NET_BROKEN,
            EVENT_ACS_NET_RESUME,
            EVENT_ACS_LOW_BATTERY,
            EVENT_ACS_BATTERY_RESUME,
            EVENT_ACS_AC_OFF,
            EVENT_ACS_AC_RESUME,
            EVENT_ACS_SD_CARD_FULL,
            EVENT_ACS_LINKAGE_CAPTURE_PIC,
            EVENT_ACS_IMAGE_QUALITY_LOW,
            EVENT_ACS_FINGER_PRINT_QUALITY_LOW,
            EVENT_ACS_BATTERY_ELECTRIC_LOW,
            EVENT_ACS_BATTERY_ELECTRIC_RESUME,
            EVENT_ACS_FIRE_IMPORT_SHORT_CIRCUIT,
            EVENT_ACS_FIRE_IMPORT_BROKEN_CIRCUIT,
            EVENT_ACS_FIRE_IMPORT_RESUME,
            EVENT_ACS_MASTER_RS485_LOOPNODE_BROKEN,
            EVENT_ACS_MASTER_RS485_LOOPNODE_RESUME,
            EVENT_ACS_LOCAL_CONTROL_OFFLINE,
            EVENT_ACS_LOCAL_CONTROL_RESUME,
            EVENT_ACS_LOCAL_DOWNSIDE_RS485_LOOPNODE_BROKEN,
            EVENT_ACS_LOCAL_DOWNSIDE_RS485_LOOPNODE_RESUME,
            EVENT_ACS_DISTRACT_CONTROLLER_ONLINE,
            EVENT_ACS_DISTRACT_CONTROLLER_OFFLINE,
            EVENT_ACS_FIRE_BUTTON_TRIGGER,
            EVENT_ACS_FIRE_BUTTON_RESUME,
            EVENT_ACS_MAINTENANCE_BUTTON_TRIGGER,
            EVENT_ACS_MAINTENANCE_BUTTON_RESUME,
            EVENT_ACS_EMERGENCY_BUTTON_TRIGGER,
            EVENT_ACS_EMERGENCY_BUTTON_RESUME,
            EVENT_ACS_MAC_DETECT
        }

        public enum ACS_DOOR_SUBEVENT_ENUM
        {
            EVENT_ACS_LEADER_CARD_OPEN_BEGIN,
            EVENT_ACS_LEADER_CARD_OPEN_END,
            EVENT_ACS_ALWAYS_OPEN_BEGIN,
            EVENT_ACS_ALWAYS_OPEN_END,
            EVENT_ACS_ALWAYS_CLOSE_BEGIN,
            EVENT_ACS_ALWAYS_CLOSE_END,
            EVENT_ACS_LOCK_OPEN,
            EVENT_ACS_LOCK_CLOSE,
            EVENT_ACS_DOOR_BUTTON_PRESS,
            EVENT_ACS_DOOR_BUTTON_RELEASE,
            EVENT_ACS_DOOR_OPEN_NORMAL,
            EVENT_ACS_DOOR_CLOSE_NORMAL,
            EVENT_ACS_DOOR_OPEN_ABNORMAL,
            EVENT_ACS_DOOR_OPEN_TIMEOUT,
            EVENT_ACS_REMOTE_OPEN_DOOR,
            EVENT_ACS_REMOTE_CLOSE_DOOR,
            EVENT_ACS_REMOTE_ALWAYS_OPEN,
            EVENT_ACS_REMOTE_ALWAYS_CLOSE,
            EVENT_ACS_NOT_BELONG_MULTI_GROUP,
            EVENT_ACS_INVALID_MULTI_VERIFY_PERIOD,
            EVENT_ACS_MULTI_VERIFY_SUPER_RIGHT_FAIL,
            EVENT_ACS_MULTI_VERIFY_REMOTE_RIGHT_FAIL,
            EVENT_ACS_MULTI_VERIFY_SUCCESS,
            EVENT_ACS_MULTI_VERIFY_NEED_REMOTE_OPEN,
            EVENT_ACS_MULTI_VERIFY_SUPERPASSWD_VERIFY_SUCCESS,
            EVENT_ACS_MULTI_VERIFY_REPEAT_VERIFY_FAIL,
            EVENT_ACS_MULTI_VERIFY_TIMEOUT,
            EVENT_ACS_REMOTE_CAPTURE_PIC,
            EVENT_ACS_DOORBELL_RINGING,
            EVENT_ACS_SECURITY_MODULE_DESMANTLE_ALARM,
            EVENT_ACS_CALL_CENTER,
            EVENT_ACS_FIRSTCARD_AUTHORIZE_BEGIN,
            EVENT_ACS_FIRSTCARD_AUTHORIZE_END,
            EVENT_ACS_DOORLOCK_INPUT_SHORT_CIRCUIT,
            EVENT_ACS_DOORLOCK_INPUT_BROKEN_CIRCUIT,
            EVENT_ACS_DOORLOCK_INPUT_EXCEPTION,
            EVENT_ACS_DOORCONTACT_INPUT_SHORT_CIRCUIT,
            EVENT_ACS_DOORCONTACT_INPUT_BROKEN_CIRCUIT,
            EVENT_ACS_DOORCONTACT_INPUT_EXCEPTION,
            EVENT_ACS_OPENBUTTON_INPUT_SHORT_CIRCUIT,
            EVENT_ACS_OPENBUTTON_INPUT_BROKEN_CIRCUIT,
            EVENT_ACS_OPENBUTTON_INPUT_EXCEPTION,
            EVENT_ACS_DOORLOCK_OPEN_EXCEPTION,
            EVENT_ACS_DOORLOCK_OPEN_TIMEOUT,
            EVENT_ACS_FIRSTCARD_OPEN_WITHOUT_AUTHORIZE,
            EVENT_ACS_CALL_LADDER_RELAY_BREAK,
            EVENT_ACS_CALL_LADDER_RELAY_CLOSE,
            EVENT_ACS_AUTO_KEY_RELAY_BREAK,
            EVENT_ACS_AUTO_KEY_RELAY_CLOSE,
            EVENT_ACS_KEY_CONTROL_RELAY_BREAK,
            EVENT_ACS_KEY_CONTROL_RELAY_CLOSE,
            EVENT_ACS_REMOTE_VISITOR_CALL_LADDER,
            EVENT_ACS_REMOTE_HOUSEHOLD_CALL_LADDER,
            EVENT_ACS_LEGAL_MESSAGE,
            EVENT_ACS_ILLEGAL_MESSAGE
        }

        public enum ENUM_UPGRADE_TYPE
        {
            ENUM_UPGRADE_DVR,
            ENUM_UPGRADE_ACS
        }

        public delegate void LoginResultCallBack(int lUserID, uint dwResult, ref CHCNetSDK.NET_DVR_DEVICEINFO_V30 lpDeviceInfo, IntPtr pUser);

        public enum LONG_CFG_RECV_DATA_TYPE_ENUM
        {
            ENUM_DVR_ERROR_CODE = 1,
            ENUM_MSC_RECV_DATA = 2,
            ENUM_ACS_RECV_DATA = 3
        }

        public enum LONG_CFG_SEND_DATA_TYPE_ENUM
        {
            ENUM_DVR_VEHICLE_CHECK = 1,
            ENUM_MSC_SEND_DATA = 2,
            ENUM_ACS_SEND_DATA = 3,
            ENUM_TME_CARD_SEND_DATA = 4,
            ENUM_TME_VEHICLE_SEND_DATA = 5,
            ENUM_DVR_DEBUG_CMD = 6,
            ENUM_DVR_SCREEN_CTRL_CMD = 7,
            ENUM_CVR_PASSBACK_SEND_DATA = 8,
            ENUM_ACS_INTELLIGENT_IDENTITY_DATA = 9,
            ENUM_VIDEO_INTERCOM_SEND_DATA = 10,
            ENUM_SEND_JSON_DATA = 11
        }

        public delegate void MSGCallBack(int lCommand, ref CHCNetSDK.NET_DVR_ALARMER pAlarmer, IntPtr pAlarmInfo, uint dwBufLen, IntPtr pUser);

        public delegate bool MSGCallBack_V31(int lCommand, ref CHCNetSDK.NET_DVR_ALARMER pAlarmer, IntPtr pAlarmInfo, uint dwBufLen, IntPtr pUser);

        [StructLayout(LayoutKind.Sequential)]
        public struct NET_DVR_ACS_ALARM_INFO
        {
            public uint dwSize;
            public uint dwMajor;
            public uint dwMinor;
            public CHCNetSDK.NET_DVR_TIME struTime;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x10, ArraySubType=UnmanagedType.I1)]
            public byte[] sNetUser;
            public CHCNetSDK.NET_DVR_IPADDR struRemoteHostAddr;
            public CHCNetSDK.NET_DVR_ACS_EVENT_INFO struAcsEventInfo;
            public uint dwPicDataLen;
            public IntPtr pPicData;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x18, ArraySubType=UnmanagedType.I1)]
            public byte[] byRes;
        }

        [StructLayout(LayoutKind.Sequential)]
        public struct NET_DVR_ACS_EVENT_CFG
        {
            public uint dwSize;
            public uint dwMajor;
            public uint dwMinor;
            public CHCNetSDK.NET_DVR_TIME struTime;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x10)]
            public byte[] sNetUser;
            public CHCNetSDK.NET_DVR_IPADDR struRemoteHostAddr;
            public CHCNetSDK.NET_DVR_ACS_EVENT_DETAIL struAcsEventInfo;
            public uint dwPicDataLen;
            public IntPtr pPicData;
            public ushort wInductiveEventType;
            public byte byTimeType;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x3d)]
            public byte[] byRes;
        }

        [StructLayout(LayoutKind.Sequential)]
        public struct NET_DVR_ACS_EVENT_COND
        {
            public uint dwSize;
            public uint dwMajor;
            public uint dwMinor;
            public CHCNetSDK.NET_DVR_TIME struStartTime;
            public CHCNetSDK.NET_DVR_TIME struEndTime;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x20, ArraySubType=UnmanagedType.I1)]
            public byte[] byCardNo;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x20, ArraySubType=UnmanagedType.I1)]
            public byte[] byName;
            public uint dwBeginSerialNo;
            public byte byPicEnable;
            public byte byTimeType;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=2, ArraySubType=UnmanagedType.I1)]
            public byte[] byRes2;
            public uint dwEndSerialNo;
            public uint dwIOTChannelNo;
            public ushort wInductiveEventType;
            public byte bySearchType;
            public byte byRes1;
            [MarshalAs(UnmanagedType.ByValTStr, SizeConst=0x40)]
            public string szMonitorID;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x20, ArraySubType=UnmanagedType.I1)]
            public byte[] byEmployeeNo;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=140, ArraySubType=UnmanagedType.I1)]
            public byte[] byRes;
            public void Init()
            {
                this.byCardNo = new byte[0x20];
                this.byName = new byte[0x20];
                this.byRes2 = new byte[2];
                this.byEmployeeNo = new byte[0x20];
                this.byRes = new byte[140];
            }
        }

        [StructLayout(LayoutKind.Sequential)]
        public struct NET_DVR_ACS_EVENT_DETAIL
        {
            public uint dwSize;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x20)]
            public byte[] byCardNo;
            public byte byCardType;
            public byte byWhiteListNo;
            public byte byReportChannel;
            public byte byCardReaderKind;
            public uint dwCardReaderNo;
            public uint dwDoorNo;
            public uint dwVerifyNo;
            public uint dwAlarmInNo;
            public uint dwAlarmOutNo;
            public uint dwCaseSensorNo;
            public uint dwRs485No;
            public uint dwMultiCardGroupNo;
            public ushort wAccessChannel;
            public byte byDeviceNo;
            public byte byDistractControlNo;
            public uint dwEmployeeNo;
            public ushort wLocalControllerID;
            public byte byInternetAccess;
            public byte byType;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=6)]
            public byte[] byMACAddr;
            public byte bySwipeCardType;
            public byte byRes2;
            public uint dwSerialNo;
            public byte byChannelControllerID;
            public byte byChannelControllerLampID;
            public byte byChannelControllerIRAdaptorID;
            public byte byChannelControllerIREmitterID;
            public uint dwRecordChannelNum;
            public uint pRecordChannelData;
            public byte byUserType;
            public byte byCurrentVerifyMode;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=2)]
            public byte[] byRe2;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x20)]
            public byte[] byEmployeeNo;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x40)]
            public byte[] byRes;
        }

        [StructLayout(LayoutKind.Sequential)]
        public struct NET_DVR_ACS_EVENT_INFO
        {
            public uint dwSize;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x20, ArraySubType=UnmanagedType.I1)]
            public byte[] byCardNo;
            public byte byCardType;
            public byte byWhiteListNo;
            public byte byReportChannel;
            public byte byCardReaderKind;
            public uint dwCardReaderNo;
            public uint dwDoorNo;
            public uint dwVerifyNo;
            public uint dwAlarmInNo;
            public uint dwAlarmOutNo;
            public uint dwCaseSensorNo;
            public uint dwRs485No;
            public uint dwMultiCardGroupNo;
            public ushort wAccessChannel;
            public byte byDeviceNo;
            public byte byDistractControlNo;
            public uint dwEmployeeNo;
            public ushort wLocalControllerID;
            public byte byInternetAccess;
            public byte byType;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=6, ArraySubType=UnmanagedType.I1)]
            public byte[] byMACAddr;
            public byte bySwipeCardType;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=13, ArraySubType=UnmanagedType.I1)]
            public byte[] byRes;
        }

        [StructLayout(LayoutKind.Sequential)]
        public struct NET_DVR_ACS_PARAM_TYPE
        {
            public uint dwSize;
            public uint dwParamType;
            public ushort wLocalControllerID;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=30)]
            public byte[] byRes;
        }

        [StructLayout(LayoutKind.Sequential)]
        public struct NET_DVR_ACS_WORK_STATUS_V50
        {
            public uint dwSize;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x100, ArraySubType=UnmanagedType.I1)]
            public byte[] byDoorLockStatus;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x100, ArraySubType=UnmanagedType.I1)]
            public byte[] byDoorStatus;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x100, ArraySubType=UnmanagedType.I1)]
            public byte[] byMagneticStatus;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=8, ArraySubType=UnmanagedType.I1)]
            public byte[] byCaseStatus;
            public ushort wBatteryVoltage;
            public byte byBatteryLowVoltage;
            public byte byPowerSupplyStatus;
            public byte byMultiDoorInterlockStatus;
            public byte byAntiSneakStatus;
            public byte byHostAntiDismantleStatus;
            public byte byIndicatorLightStatus;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x200, ArraySubType=UnmanagedType.I1)]
            public byte[] byCardReaderOnlineStatus;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x200, ArraySubType=UnmanagedType.I1)]
            public byte[] byCardReaderAntiDismantleStatus;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x200, ArraySubType=UnmanagedType.I1)]
            public byte[] byCardReaderVerifyMode;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x200, ArraySubType=UnmanagedType.I1)]
            public byte[] bySetupAlarmStatus;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x200, ArraySubType=UnmanagedType.I1)]
            public byte[] byAlarmInStatus;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x200, ArraySubType=UnmanagedType.I1)]
            public byte[] byAlarmOutStatus;
            public uint dwCardNum;
            public byte byFireAlarmStatus;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x7b, ArraySubType=UnmanagedType.I1)]
            public byte[] byRes2;
            public void Init()
            {
                this.byDoorLockStatus = new byte[0x100];
                this.byDoorStatus = new byte[0x100];
                this.byMagneticStatus = new byte[0x100];
                this.byCaseStatus = new byte[8];
                this.byCardReaderOnlineStatus = new byte[0x200];
                this.byCardReaderAntiDismantleStatus = new byte[0x200];
                this.byCardReaderVerifyMode = new byte[0x200];
                this.bySetupAlarmStatus = new byte[0x200];
                this.byAlarmInStatus = new byte[0x200];
                this.byAlarmOutStatus = new byte[0x200];
                this.byRes2 = new byte[0x7b];
            }
        }

        [StructLayout(LayoutKind.Sequential)]
        public struct NET_DVR_ALARM_DEVICE_USER
        {
            public uint dwSize;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x20, ArraySubType=UnmanagedType.I1)]
            public byte[] sUserName;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x10, ArraySubType=UnmanagedType.I1)]
            public byte[] sPassword;
            public CHCNetSDK.NET_DVR_IPADDR struUserIP;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=6, ArraySubType=UnmanagedType.I1)]
            public byte[] byAMCAddr;
            public byte byUserType;
            public byte byAlarmOnRight;
            public byte byAlarmOffRight;
            public byte byBypassRight;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x20, ArraySubType=UnmanagedType.I1)]
            public byte[] byOtherRight;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=8, ArraySubType=UnmanagedType.I1)]
            public byte[] byNetPreviewRight;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=8, ArraySubType=UnmanagedType.I1)]
            public byte[] byNetRecordRight;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=8, ArraySubType=UnmanagedType.I1)]
            public byte[] byNetPlaybackRight;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=8, ArraySubType=UnmanagedType.I1)]
            public byte[] byNetPTZRight;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x10, ArraySubType=UnmanagedType.I1)]
            public byte[] sOriginalPassword;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x98, ArraySubType=UnmanagedType.I1)]
            public byte[] byRes2;
        }

        [StructLayout(LayoutKind.Sequential)]
        public struct NET_DVR_ALARMER
        {
            public byte byUserIDValid;
            public byte bySerialValid;
            public byte byVersionValid;
            public byte byDeviceNameValid;
            public byte byMacAddrValid;
            public byte byLinkPortValid;
            public byte byDeviceIPValid;
            public byte bySocketIPValid;
            public int lUserID;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x30, ArraySubType=UnmanagedType.I1)]
            public byte[] sSerialNumber;
            public uint dwDeviceVersion;
            [MarshalAs(UnmanagedType.ByValTStr, SizeConst=0x20)]
            public string sDeviceName;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=6, ArraySubType=UnmanagedType.I1)]
            public byte[] byMacAddr;
            public ushort wLinkPort;
            [MarshalAs(UnmanagedType.ByValTStr, SizeConst=0x80)]
            public string sDeviceIP;
            [MarshalAs(UnmanagedType.ByValTStr, SizeConst=0x80)]
            public string sSocketIP;
            public byte byIpProtocol;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=11, ArraySubType=UnmanagedType.I1)]
            public byte[] byRes2;
        }

        [StructLayout(LayoutKind.Sequential)]
        public struct NET_DVR_CAPTURE_FACE_CFG
        {
            public uint dwSize;
            public uint dwFaceTemplate1Size;
            public IntPtr pFaceTemplate1Buffer;
            public uint dwFaceTemplate2Size;
            public IntPtr pFaceTemplate2Buffer;
            public uint dwFacePicSize;
            public IntPtr pFacePicBuffer;
            public byte byFaceQuality1;
            public byte byFaceQuality2;
            public byte byCaptureProgress;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x7d, ArraySubType=UnmanagedType.I1)]
            public byte[] byRes;
        }

        [StructLayout(LayoutKind.Sequential)]
        public struct NET_DVR_CAPTURE_FACE_COND
        {
            public uint dwSize;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x80, ArraySubType=UnmanagedType.I1)]
            public byte[] byRes;
        }

        [StructLayout(LayoutKind.Sequential)]
        public struct NET_DVR_CARD_CFG_COND
        {
            public uint dwSize;
            public uint dwCardNum;
            public byte byCheckCardNo;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=3, ArraySubType=UnmanagedType.I1)]
            public byte[] byRes1;
            public ushort wLocalControllerID;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=2, ArraySubType=UnmanagedType.I1)]
            public byte[] byRes2;
            public uint dwLockID;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=20, ArraySubType=UnmanagedType.I1)]
            public byte[] byRes3;
        }

        [StructLayout(LayoutKind.Sequential)]
        public struct NET_DVR_CARD_CFG_SEND_DATA
        {
            public uint dwSize;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x20, ArraySubType=UnmanagedType.I1)]
            public byte[] byCardNo;
            public uint dwCardUserId;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=12, ArraySubType=UnmanagedType.I1)]
            public byte[] byRes;
        }

        [StructLayout(LayoutKind.Sequential)]
        public struct NET_DVR_CARD_CFG_V50
        {
            public uint dwSize;
            public uint dwModifyParamType;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x20, ArraySubType=UnmanagedType.I1)]
            public byte[] byCardNo;
            public byte byCardValid;
            public byte byCardType;
            public byte byLeaderCard;
            public byte byRes1;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x100, ArraySubType=UnmanagedType.I1)]
            public byte[] byDoorRight;
            public CHCNetSDK.NET_DVR_VALID_PERIOD_CFG struValid;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x80, ArraySubType=UnmanagedType.I1)]
            public byte[] byBelongGroup;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=8, ArraySubType=UnmanagedType.I1)]
            public byte[] byCardPassword;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x400, ArraySubType=UnmanagedType.I1)]
            public ushort[] wCardRightPlan;
            public uint dwMaxSwipeTime;
            public uint dwSwipeTime;
            public ushort wRoomNumber;
            public short wFloorNumber;
            public uint dwEmployeeNo;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x20, ArraySubType=UnmanagedType.I1)]
            public byte[] byName;
            public ushort wDepartmentNo;
            public ushort wSchedulePlanNo;
            public byte bySchedulePlanType;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=3, ArraySubType=UnmanagedType.I1)]
            public byte[] byRes2;
            public uint dwLockID;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=8, ArraySubType=UnmanagedType.I1)]
            public byte[] byLockCode;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=8, ArraySubType=UnmanagedType.I1)]
            public byte[] byRoomCode;
            public uint dwCardRight;
            public uint dwPlanTemplate;
            public uint dwCardUserId;
            public byte byCardModelType;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x53, ArraySubType=UnmanagedType.I1)]
            public byte[] byRes3;
            public void Init()
            {
                this.byDoorRight = new byte[0x100];
                this.byBelongGroup = new byte[0x80];
                this.wCardRightPlan = new ushort[0x400];
                this.byCardNo = new byte[0x20];
                this.byCardPassword = new byte[8];
                this.byName = new byte[0x20];
                this.byRes2 = new byte[3];
                this.byLockCode = new byte[8];
                this.byRoomCode = new byte[8];
                this.byRes3 = new byte[0x53];
            }
        }

        [StructLayout(LayoutKind.Sequential)]
        public struct NET_DVR_CARD_COND
        {
            public uint dwSize;
            public uint dwCardNum;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x40, ArraySubType=UnmanagedType.I1)]
            public byte[] byRes;
            public void Init()
            {
                this.byRes = new byte[0x40];
            }
        }

        [StructLayout(LayoutKind.Sequential)]
        public struct NET_DVR_CARD_READER_CFG_V50
        {
            public uint dwSize;
            public byte byEnable;
            public byte byCardReaderType;
            public byte byOkLedPolarity;
            public byte byErrorLedPolarity;
            public byte byBuzzerPolarity;
            public byte bySwipeInterval;
            public byte byPressTimeout;
            public byte byEnableFailAlarm;
            public byte byMaxReadCardFailNum;
            public byte byEnableTamperCheck;
            public byte byOfflineCheckTime;
            public byte byFingerPrintCheckLevel;
            public byte byUseLocalController;
            public byte byRes1;
            public ushort wLocalControllerID;
            public ushort wLocalControllerReaderID;
            public ushort wCardReaderChannel;
            public byte byFingerPrintImageQuality;
            public byte byFingerPrintContrastTimeOut;
            public byte byFingerPrintRecogizeInterval;
            public byte byFingerPrintMatchFastMode;
            public byte byFingerPrintModuleSensitive;
            public byte byFingerPrintModuleLightCondition;
            public byte byFaceMatchThresholdN;
            public byte byFaceQuality;
            public byte byFaceRecogizeTimeOut;
            public byte byFaceRecogizeInterval;
            public ushort wCardReaderFunction;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x20, ArraySubType=UnmanagedType.I1)]
            public byte[] byCardReaderDescription;
            public ushort wFaceImageSensitometry;
            public byte byLivingBodyDetect;
            public byte byFaceMatchThreshold1;
            public ushort wBuzzerTime;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0xfe, ArraySubType=UnmanagedType.I1)]
            public byte[] byRes;
            public void Init()
            {
                this.byCardReaderDescription = new byte[0x20];
                this.byRes = new byte[0xfe];
            }
        }

        [StructLayout(LayoutKind.Sequential)]
        public struct NET_DVR_CARD_READER_PLAN
        {
            public uint dwSize;
            public uint dwTemplateNo;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x40)]
            public byte[] byRes;
            public void Init()
            {
                this.byRes = new byte[0x40];
            }
        }

        [StructLayout(LayoutKind.Sequential)]
        public struct NET_DVR_CARD_RECORD
        {
            public uint dwSize;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x20, ArraySubType=UnmanagedType.I1)]
            public byte[] byCardNo;
            public byte byCardType;
            public byte byLeaderCard;
            public byte byUserType;
            public byte byRes1;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x100, ArraySubType=UnmanagedType.I1)]
            public byte[] byDoorRight;
            public CHCNetSDK.NET_DVR_VALID_PERIOD_CFG struValid;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x80, ArraySubType=UnmanagedType.I1)]
            public byte[] byBelongGroup;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=8, ArraySubType=UnmanagedType.I1)]
            public byte[] byCardPassword;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x100, ArraySubType=UnmanagedType.I1)]
            public ushort[] wCardRightPlan;
            public uint dwMaxSwipeTimes;
            public uint dwSwipeTimes;
            public uint dwEmployeeNo;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x20, ArraySubType=UnmanagedType.I1)]
            public byte[] byName;
            public uint dwCardRight;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x100, ArraySubType=UnmanagedType.I1)]
            public byte[] byRes;
            public void Init()
            {
                this.byCardNo = new byte[0x20];
                this.byDoorRight = new byte[0x100];
                this.byBelongGroup = new byte[0x80];
                this.byCardPassword = new byte[8];
                this.wCardRightPlan = new ushort[0x100];
                this.byName = new byte[0x20];
                this.byRes = new byte[0x100];
            }
        }

        [StructLayout(LayoutKind.Sequential)]
        public struct NET_DVR_CARD_SEND_DATA
        {
            public uint dwSize;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x20, ArraySubType=UnmanagedType.I1)]
            public byte[] byCardNo;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x10, ArraySubType=UnmanagedType.I1)]
            public byte[] byRes;
            public void Init()
            {
                this.byCardNo = new byte[0x20];
                this.byRes = new byte[0x10];
            }
        }

        [StructLayout(LayoutKind.Sequential)]
        public struct NET_DVR_CARD_STATUS
        {
            public uint dwSize;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x20, ArraySubType=UnmanagedType.I1)]
            public byte[] byCardNo;
            public uint dwErrorCode;
            public byte byStatus;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x17, ArraySubType=UnmanagedType.I1)]
            public byte[] byRes;
            public void Init()
            {
                this.byCardNo = new byte[0x20];
                this.byRes = new byte[0x17];
            }
        }

        [StructLayout(LayoutKind.Sequential)]
        public struct NET_DVR_CARD_USER_INFO_CFG
        {
            public uint dwSize;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x20)]
            public byte[] byUsername;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x100)]
            public byte[] byRes2;
        }

        [StructLayout(LayoutKind.Sequential)]
        public struct NET_DVR_CLIENTINFO
        {
            public int lChannel;
            public uint lLinkMode;
            public IntPtr hPlayWnd;
            public string sMultiCastIP;
        }

        [StructLayout(LayoutKind.Sequential)]
        public struct NET_DVR_DATE
        {
            public ushort wYear;
            public byte byMonth;
            public byte byDay;
        }

        [StructLayout(LayoutKind.Sequential)]
        public struct NET_DVR_DDNS_STREAM_CFG
        {
            public byte byEnable;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=3, ArraySubType=UnmanagedType.I1)]
            public byte[] byRes1;
            private CHCNetSDK.NET_DVR_IPADDR struStreamServer;
            public ushort wStreamServerPort;
            public byte byStreamServerTransmitType;
            public byte byRes2;
            private CHCNetSDK.NET_DVR_IPADDR struIPServer;
            public ushort wIPServerPort;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=2, ArraySubType=UnmanagedType.I1)]
            public byte[] byRes3;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x20, ArraySubType=UnmanagedType.I1)]
            public byte[] sDVRName;
            public ushort wDVRNameLen;
            public ushort wDVRSerialLen;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x30, ArraySubType=UnmanagedType.I1)]
            public byte[] sDVRSerialNumber;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x20, ArraySubType=UnmanagedType.I1)]
            public byte[] sUserName;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x10, ArraySubType=UnmanagedType.I1)]
            public byte[] sPassWord;
            public ushort wDVRPort;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=2, ArraySubType=UnmanagedType.I1)]
            public byte[] byRes4;
            public byte byChannel;
            public byte byTransProtocol;
            public byte byTransMode;
            public byte byFactoryType;
            public void Init()
            {
                this.byRes1 = new byte[3];
                this.byRes3 = new byte[2];
                this.sDVRSerialNumber = new byte[0x30];
                this.sUserName = new byte[0x20];
                this.sPassWord = new byte[0x10];
                this.byRes4 = new byte[2];
            }
        }

        [StructLayout(LayoutKind.Sequential)]
        public struct NET_DVR_DEV_CHAN_INFO
        {
            public CHCNetSDK.NET_DVR_IPADDR struIP;
            public ushort wDVRPort;
            public byte byChannel;
            public byte byTransProtocol;
            public byte byTransMode;
            public byte byFactoryType;
            public byte byDeviceType;
            public byte byDispChan;
            public byte bySubDispChan;
            public byte byResolution;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=2, ArraySubType=UnmanagedType.I1)]
            public byte[] byRes;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x40, ArraySubType=UnmanagedType.I1)]
            public byte[] byDomain;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x20, ArraySubType=UnmanagedType.I1)]
            public byte[] sUserName;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x10, ArraySubType=UnmanagedType.I1)]
            public byte[] sPassword;
            public void Init()
            {
                this.byRes = new byte[2];
                this.byDomain = new byte[0x40];
                this.sUserName = new byte[0x20];
                this.sPassword = new byte[0x10];
            }
        }

        [StructLayout(LayoutKind.Sequential)]
        public struct NET_DVR_DEVICECFG_V40
        {
            public uint dwSize;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x20)]
            public byte[] sDVRName;
            public uint dwDVRID;
            public uint dwRecycleRecord;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x30)]
            public byte[] sSerialNumber;
            public uint dwSoftwareVersion;
            public uint dwSoftwareBuildDate;
            public uint dwDSPSoftwareVersion;
            public uint dwDSPSoftwareBuildDate;
            public uint dwPanelVersion;
            public uint dwHardwareVersion;
            public byte byAlarmInPortNum;
            public byte byAlarmOutPortNum;
            public byte byRS232Num;
            public byte byRS485Num;
            public byte byNetworkPortNum;
            public byte byDiskCtrlNum;
            public byte byDiskNum;
            public byte byDVRType;
            public byte byChanNum;
            public byte byStartChan;
            public byte byDecordChans;
            public byte byVGANum;
            public byte byUSBNum;
            public byte byAuxoutNum;
            public byte byAudioNum;
            public byte byIPChanNum;
            public byte byZeroChanNum;
            public byte bySupport;
            public byte byEsataUseage;
            public byte byIPCPlug;
            public byte byStorageMode;
            public byte bySupport1;
            public ushort wDevType;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x18)]
            public byte[] byDevTypeName;
            public byte bySupport2;
            public byte byAnalogAlarmInPortNum;
            public byte byStartAlarmInNo;
            public byte byStartAlarmOutNo;
            public byte byStartIPAlarmInNo;
            public byte byStartIPAlarmOutNo;
            public byte byHighIPChanNum;
            public byte byEnableRemotePowerOn;
            public ushort wDevClass;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=6)]
            public byte[] byRes2;
        }

        [StructLayout(LayoutKind.Sequential)]
        public struct NET_DVR_DEVICEINFO_V30
        {
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x30, ArraySubType=UnmanagedType.I1)]
            public byte[] sSerialNumber;
            public byte byAlarmInPortNum;
            public byte byAlarmOutPortNum;
            public byte byDiskNum;
            public byte byDVRType;
            public byte byChanNum;
            public byte byStartChan;
            public byte byAudioChanNum;
            public byte byIPChanNum;
            public byte byZeroChanNum;
            public byte byMainProto;
            public byte bySubProto;
            public byte bySupport;
            public byte bySupport1;
            public byte bySupport2;
            public ushort wDevType;
            public byte bySupport3;
            public byte byMultiStreamProto;
            public byte byStartDChan;
            public byte byStartDTalkChan;
            public byte byHighDChanNum;
            public byte bySupport4;
            public byte byLanguageType;
            public byte byVoiceInChanNum;
            public byte byStartVoiceInChanNo;
            public byte bySupport5;
            public byte bySupport6;
            public byte byMirrorChanNum;
            public ushort wStartMirrorChanNo;
            public byte bySupport7;
            public byte byRes2;
        }

        [StructLayout(LayoutKind.Sequential)]
        public struct NET_DVR_DEVICEINFO_V40
        {
            public CHCNetSDK.NET_DVR_DEVICEINFO_V30 struDeviceV30;
            public byte bySupportLock;
            public byte byRetryLoginTime;
            public byte byPasswordLevel;
            public byte byProxyType;
            public uint dwSurplusLockTime;
            public byte byCharEncodeType;
            public byte byRes1;
            public byte bySupport;
            public byte byRes;
            public uint dwOEMCode;
            public byte bySupportDev5;
            public byte byLoginMode;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0xf6)]
            public byte[] byRes2;
        }

        [StructLayout(LayoutKind.Sequential)]
        public struct NET_DVR_DOOR_CFG
        {
            public uint dwSize;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x20, ArraySubType=UnmanagedType.I1)]
            public byte[] byDoorName;
            public byte byMagneticType;
            public byte byOpenButtonType;
            public byte byOpenDuration;
            public byte byDisabledOpenDuration;
            public byte byMagneticAlarmTimeout;
            public byte byEnableDoorLock;
            public byte byEnableLeaderCard;
            public byte byLeaderCardMode;
            public uint dwLeaderCardOpenDuration;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=8, ArraySubType=UnmanagedType.I1)]
            public byte[] byStressPassword;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=8, ArraySubType=UnmanagedType.I1)]
            public byte[] bySuperPassword;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=8, ArraySubType=UnmanagedType.I1)]
            public byte[] byUnlockPassword;
            public byte byUseLocalController;
            public byte byRes1;
            public ushort wLocalControllerID;
            public ushort wLocalControllerDoorNumber;
            public ushort wLocalControllerStatus;
            public byte byLockInputCheck;
            public byte byLockInputType;
            public byte byDoorTerminalMode;
            public byte byOpenButton;
            public byte byLadderControlDelayTime;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x2b, ArraySubType=UnmanagedType.I1)]
            public byte[] byRes2;
            public void Init()
            {
                this.byDoorName = new byte[0x20];
                this.byStressPassword = new byte[8];
                this.bySuperPassword = new byte[8];
                this.byUnlockPassword = new byte[8];
                this.byRes2 = new byte[0x2b];
            }
        }

        [StructLayout(LayoutKind.Sequential)]
        public struct NET_DVR_DOOR_STATUS_PLAN
        {
            public uint dwSize;
            public uint dwTemplateNo;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x40)]
            public byte[] byRes;
            public void Init()
            {
                this.byRes = new byte[0x40];
            }
        }

        [StructLayout(LayoutKind.Sequential)]
        public struct NET_DVR_ETHERNET_V30
        {
            public CHCNetSDK.NET_DVR_IPADDR struDVRIP;
            public CHCNetSDK.NET_DVR_IPADDR struDVRIPMask;
            public uint dwNetInterface;
            public ushort wDVRPort;
            public ushort wMTU;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=6, ArraySubType=UnmanagedType.I1)]
            public byte[] byMACAddr;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=2, ArraySubType=UnmanagedType.I1)]
            public byte[] byRes;
        }

        [StructLayout(LayoutKind.Sequential)]
        public struct NET_DVR_EVENT_CARD_LINKAGE_CFG_V50
        {
            public uint dwSize;
            public byte byProMode;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=3, ArraySubType=UnmanagedType.I1)]
            public byte[] byRes1;
            public uint dwEventSourceID;
            public CHCNetSDK.NET_DVR_EVETN_CARD_LINKAGE_UNION uLinkageInfo;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x200, ArraySubType=UnmanagedType.I1)]
            public byte[] byAlarmout;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x20, ArraySubType=UnmanagedType.I1)]
            public byte[] byRes2;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x100, ArraySubType=UnmanagedType.I1)]
            public byte[] byOpenDoor;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x100, ArraySubType=UnmanagedType.I1)]
            public byte[] byCloseDoor;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x100, ArraySubType=UnmanagedType.I1)]
            public byte[] byNormalOpen;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x100, ArraySubType=UnmanagedType.I1)]
            public byte[] byNormalClose;
            public byte byMainDevBuzzer;
            public byte byCapturePic;
            public byte byRecordVideo;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x1d, ArraySubType=UnmanagedType.I1)]
            public byte[] byRes3;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x200, ArraySubType=UnmanagedType.I1)]
            public byte[] byReaderBuzzer;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x200, ArraySubType=UnmanagedType.I1)]
            public byte[] byAlarmOutClose;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x200, ArraySubType=UnmanagedType.I1)]
            public byte[] byAlarmInSetup;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x200, ArraySubType=UnmanagedType.I1)]
            public byte[] byAlarmInClose;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=500, ArraySubType=UnmanagedType.I1)]
            public byte[] byRes;
            public void Init()
            {
                this.byRes1 = new byte[3];
                this.byAlarmout = new byte[0x200];
                this.byOpenDoor = new byte[0x100];
                this.byCloseDoor = new byte[0x100];
                this.byNormalOpen = new byte[0x100];
                this.byNormalClose = new byte[0x100];
                this.byRes3 = new byte[0x1d];
                this.byReaderBuzzer = new byte[0x200];
                this.byAlarmOutClose = new byte[0x200];
                this.byAlarmInSetup = new byte[0x200];
                this.byAlarmInClose = new byte[0x200];
                this.byRes = new byte[500];
            }
        }

        [StructLayout(LayoutKind.Sequential)]
        public struct NET_DVR_EVENT_CARD_LINKAGE_CFG_V51
        {
            public uint dwSize;
            public byte byProMode;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=3, ArraySubType=UnmanagedType.I1)]
            public byte[] byRes1;
            public uint dwEventSourceID;
            public CHCNetSDK.NET_DVR_EVETN_CARD_LINKAGE_UNION uLinkageInfo;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x200, ArraySubType=UnmanagedType.I1)]
            public byte[] byAlarmout;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x20, ArraySubType=UnmanagedType.I1)]
            public byte[] byRes2;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x100, ArraySubType=UnmanagedType.I1)]
            public byte[] byOpenDoor;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x100, ArraySubType=UnmanagedType.I1)]
            public byte[] byCloseDoor;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x100, ArraySubType=UnmanagedType.I1)]
            public byte[] byNormalOpen;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x100, ArraySubType=UnmanagedType.I1)]
            public byte[] byNormalClose;
            public byte byMainDevBuzzer;
            public byte byCapturePic;
            public byte byRecordVideo;
            public byte byMainDevStopBuzzer;
            public ushort wAudioDisplayID;
            public byte byAudioDisplayMode;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x19, ArraySubType=UnmanagedType.I1)]
            public byte[] byRes3;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x200, ArraySubType=UnmanagedType.I1)]
            public byte[] byReaderBuzzer;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x200, ArraySubType=UnmanagedType.I1)]
            public byte[] byAlarmOutClose;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x200, ArraySubType=UnmanagedType.I1)]
            public byte[] byAlarmInSetup;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x200, ArraySubType=UnmanagedType.I1)]
            public byte[] byAlarmInClose;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x200, ArraySubType=UnmanagedType.I1)]
            public byte[] byReaderStopBuzzer;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x200, ArraySubType=UnmanagedType.I1)]
            public byte[] byRes;
            public void Init()
            {
                this.byRes1 = new byte[3];
                this.byAlarmout = new byte[0x200];
                this.byRes2 = new byte[0x20];
                this.byOpenDoor = new byte[0x100];
                this.byCloseDoor = new byte[0x100];
                this.byNormalOpen = new byte[0x100];
                this.byNormalClose = new byte[0x100];
                this.byRes3 = new byte[0x19];
                this.byReaderBuzzer = new byte[0x200];
                this.byAlarmOutClose = new byte[0x200];
                this.byAlarmInSetup = new byte[0x200];
                this.byAlarmInClose = new byte[0x200];
                this.byReaderStopBuzzer = new byte[0x200];
                this.byRes = new byte[0x200];
            }
        }

        [StructLayout(LayoutKind.Sequential)]
        public struct NET_DVR_EVENT_CARD_LINKAGE_COND
        {
            public uint dwSize;
            public uint dwEventID;
            public ushort wLocalControllerID;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x6a, ArraySubType=UnmanagedType.I1)]
            public byte[] byRes;
        }

        [StructLayout(LayoutKind.Sequential)]
        public struct NET_DVR_EVENT_LINKAGE_INFO
        {
            public ushort wMainEventType;
            public ushort wSubEventType;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x1c, ArraySubType=UnmanagedType.I1)]
            public byte[] byRes;
        }

        [StructLayout(LayoutKind.Explicit)]
        public struct NET_DVR_EVETN_CARD_LINKAGE_UNION
        {
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x20, ArraySubType=UnmanagedType.I1), FieldOffset(0)]
            public byte[] byCardNo;
            [FieldOffset(0)]
            public CHCNetSDK.NET_DVR_EVENT_LINKAGE_INFO struEventLinkage;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=6, ArraySubType=UnmanagedType.I1), FieldOffset(0)]
            public byte[] byMACAddr;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x20, ArraySubType=UnmanagedType.I1), FieldOffset(0)]
            public byte[] byEmployeeNo;
        }

        [StructLayout(LayoutKind.Sequential)]
        public struct NET_DVR_FACE_COND
        {
            public uint dwSize;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x20, ArraySubType=UnmanagedType.I1)]
            public byte[] byCardNo;
            public uint dwFaceNum;
            public uint dwEnableReaderNo;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x7c, ArraySubType=UnmanagedType.I1)]
            public byte[] byRes;
            public void Init()
            {
                this.byCardNo = new byte[0x20];
                this.byRes = new byte[0x7c];
            }
        }

        [StructLayout(LayoutKind.Sequential)]
        public struct NET_DVR_FACE_PARAM_BYCARD
        {
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x20, ArraySubType=UnmanagedType.I1)]
            public byte[] byCardNo;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x200, ArraySubType=UnmanagedType.I1)]
            public byte[] byEnableCardReader;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=2, ArraySubType=UnmanagedType.I1)]
            public byte[] byFaceID;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x2a, ArraySubType=UnmanagedType.I1)]
            public byte[] byRes1;
            public void Init()
            {
                this.byCardNo = new byte[0x20];
                this.byEnableCardReader = new byte[0x200];
                this.byFaceID = new byte[2];
                this.byRes1 = new byte[0x2a];
            }
        }

        [StructLayout(LayoutKind.Sequential)]
        public struct NET_DVR_FACE_PARAM_BYREADER
        {
            public int dwCardReaderNo;
            public byte byClearAllCard;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=3, ArraySubType=UnmanagedType.I1)]
            public byte[] byRes1;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x20, ArraySubType=UnmanagedType.I1)]
            public byte[] byCardNo;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x224, ArraySubType=UnmanagedType.I1)]
            public byte[] byRes;
            public void Init()
            {
                this.byRes1 = new byte[3];
                this.byCardNo = new byte[0x20];
                this.byRes = new byte[0x224];
            }
        }

        [StructLayout(LayoutKind.Sequential)]
        public struct NET_DVR_FACE_PARAM_CFG
        {
            public uint dwSize;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x20, ArraySubType=UnmanagedType.I1)]
            public byte[] byCardNo;
            public uint dwFaceLen;
            public IntPtr pFaceBuffer;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x200, ArraySubType=UnmanagedType.I1)]
            public byte[] byEnableCardReader;
            public byte byFaceID;
            public byte byFaceDataType;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x7e, ArraySubType=UnmanagedType.I1)]
            public byte[] byRes;
            public void Init()
            {
                this.byCardNo = new byte[0x20];
                this.byEnableCardReader = new byte[0x200];
                this.byRes = new byte[0x7e];
            }
        }

        [StructLayout(LayoutKind.Sequential)]
        public struct NET_DVR_FACE_PARAM_COND
        {
            public uint dwSize;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x20, ArraySubType=UnmanagedType.I1)]
            public byte[] byCardNo;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x200, ArraySubType=UnmanagedType.I1)]
            public byte[] byEnableCardReader;
            public uint dwFaceNum;
            public byte byFaceID;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x7f, ArraySubType=UnmanagedType.I1)]
            public byte[] byRes;
            public void Init()
            {
                this.byCardNo = new byte[0x20];
                this.byEnableCardReader = new byte[0x200];
                this.byRes = new byte[0x7f];
            }
        }

        [StructLayout(LayoutKind.Sequential)]
        public struct NET_DVR_FACE_PARAM_CTRL_ByCard
        {
            public int dwSize;
            public byte byMode;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=3, ArraySubType=UnmanagedType.I1)]
            public byte[] byRes1;
            public CHCNetSDK.NET_DVR_FACE_PARAM_BYCARD struProcessMode;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x40, ArraySubType=UnmanagedType.I1)]
            public byte[] byRes;
            public void Init()
            {
                this.byRes1 = new byte[3];
                this.byRes = new byte[0x40];
                this.struProcessMode = new CHCNetSDK.NET_DVR_FACE_PARAM_BYCARD();
                this.struProcessMode.Init();
            }
        }

        [StructLayout(LayoutKind.Sequential)]
        public struct NET_DVR_FACE_PARAM_CTRL_ByReader
        {
            public int dwSize;
            public byte byMode;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=3, ArraySubType=UnmanagedType.I1)]
            public byte[] byRes1;
            public CHCNetSDK.NET_DVR_FACE_PARAM_BYREADER struProcessMode;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x40, ArraySubType=UnmanagedType.I1)]
            public byte[] byRes;
            public void Init()
            {
                this.byRes1 = new byte[3];
                this.byRes = new byte[0x40];
                this.struProcessMode = new CHCNetSDK.NET_DVR_FACE_PARAM_BYREADER();
                this.struProcessMode.Init();
            }
        }

        [StructLayout(LayoutKind.Sequential)]
        public struct NET_DVR_FACE_PARAM_STATUS
        {
            public uint dwSize;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x20, ArraySubType=UnmanagedType.I1)]
            public byte[] byCardNo;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x200, ArraySubType=UnmanagedType.I1)]
            public byte[] byCardReaderRecvStatus;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x20, ArraySubType=UnmanagedType.I1)]
            public byte[] byErrorMsg;
            public uint dwCardReaderNo;
            public byte byTotalStatus;
            public byte byFaceID;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=130, ArraySubType=UnmanagedType.I1)]
            public byte[] byRes;
        }

        [StructLayout(LayoutKind.Sequential)]
        public struct NET_DVR_FACE_RECORD
        {
            public uint dwSize;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x20, ArraySubType=UnmanagedType.I1)]
            public byte[] byCardNo;
            public uint dwFaceLen;
            public IntPtr pFaceBuffer;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x80, ArraySubType=UnmanagedType.I1)]
            public byte[] byRes;
            public void Init()
            {
                this.byCardNo = new byte[0x20];
                this.byRes = new byte[0x80];
            }
        }

        [StructLayout(LayoutKind.Sequential)]
        public struct NET_DVR_FACE_STATUS
        {
            public uint dwSize;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x20, ArraySubType=UnmanagedType.I1)]
            public byte[] byCardNo;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x20, ArraySubType=UnmanagedType.I1)]
            public byte[] byErrorMsg;
            public uint dwReaderNo;
            public byte byRecvStatus;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x83, ArraySubType=UnmanagedType.I1)]
            public byte[] byRes;
            public void Init()
            {
                this.byCardNo = new byte[0x20];
                this.byErrorMsg = new byte[0x20];
                this.byRes = new byte[0x83];
            }
        }

        [StructLayout(LayoutKind.Sequential)]
        public struct NET_DVR_FAILED_FACE_INFO
        {
            public int dwSize;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x20)]
            public byte[] byCardNo;
            public byte byErrorCode;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x7f)]
            public byte[] byRes;
        }

        [StructLayout(LayoutKind.Sequential)]
        public struct NET_DVR_FINGER_PRINT_BYCARD
        {
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x20, ArraySubType=UnmanagedType.I1)]
            public byte[] byCardNo;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x200, ArraySubType=UnmanagedType.I1)]
            public byte[] byEnableCardReader;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=10, ArraySubType=UnmanagedType.I1)]
            public byte[] byFingerPrintID;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x22, ArraySubType=UnmanagedType.I1)]
            public byte[] byRes1;
        }

        [StructLayout(LayoutKind.Sequential)]
        public struct NET_DVR_FINGER_PRINT_BYCARD_V50
        {
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x20, ArraySubType=UnmanagedType.I1)]
            public byte[] byCardNo;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x200, ArraySubType=UnmanagedType.I1)]
            public byte[] byEnableCardReader;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=10, ArraySubType=UnmanagedType.I1)]
            public byte[] byFingerPrintID;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=2, ArraySubType=UnmanagedType.I1)]
            public byte[] byRes1;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x20, ArraySubType=UnmanagedType.I1)]
            public byte[] byEmployeeNo;
        }

        [StructLayout(LayoutKind.Sequential)]
        public struct NET_DVR_FINGER_PRINT_BYREADER
        {
            public uint dwCardReaderNo;
            public byte byClearAllCard;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=3, ArraySubType=UnmanagedType.I1)]
            public byte[] byRes1;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x20, ArraySubType=UnmanagedType.I1)]
            public byte[] byCardNo;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x224, ArraySubType=UnmanagedType.I1)]
            public byte[] byRes;
        }

        [StructLayout(LayoutKind.Sequential)]
        public struct NET_DVR_FINGER_PRINT_BYREADER_V50
        {
            public uint dwCardReaderNo;
            public byte byClearAllCard;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=3, ArraySubType=UnmanagedType.I1)]
            public byte[] byRes1;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x20, ArraySubType=UnmanagedType.I1)]
            public byte[] byCardNo;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x20, ArraySubType=UnmanagedType.I1)]
            public byte[] byEmployeeNo;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x204, ArraySubType=UnmanagedType.I1)]
            public byte[] byRes;
        }

        [StructLayout(LayoutKind.Sequential)]
        public struct NET_DVR_FINGER_PRINT_CFG
        {
            public uint dwSize;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x20, ArraySubType=UnmanagedType.I1)]
            public byte[] byCardNo;
            public uint dwFingerPrintLen;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x200, ArraySubType=UnmanagedType.I1)]
            public byte[] byEnableCardReader;
            public byte byFingerPrintID;
            public byte byFingerType;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=30, ArraySubType=UnmanagedType.I1)]
            public byte[] byRes1;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x300, ArraySubType=UnmanagedType.I1)]
            public byte[] byFingerData;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x40, ArraySubType=UnmanagedType.I1)]
            public byte[] byRes;
            public void Init()
            {
                this.byCardNo = new byte[0x20];
                this.byEnableCardReader = new byte[0x200];
                this.byRes1 = new byte[30];
                this.byFingerData = new byte[0x300];
                this.byRes = new byte[0x40];
            }
        }

        [StructLayout(LayoutKind.Sequential)]
        public struct NET_DVR_FINGER_PRINT_CFG_V50
        {
            public uint dwSize;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x20, ArraySubType=UnmanagedType.I1)]
            public byte[] byCardNo;
            public uint dwFingerPrintLen;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x200, ArraySubType=UnmanagedType.I1)]
            public byte[] byEnableCardReader;
            public byte byFingerPrintID;
            public byte byFingerType;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=30, ArraySubType=UnmanagedType.I1)]
            public byte[] byRes1;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x300, ArraySubType=UnmanagedType.I1)]
            public byte[] byFingerData;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x20, ArraySubType=UnmanagedType.I1)]
            public byte[] byEmployeeNo;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x100, ArraySubType=UnmanagedType.I1)]
            public byte[] byLeaderFP;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x80, ArraySubType=UnmanagedType.I1)]
            public byte[] byRes;
            public void Init()
            {
                this.byCardNo = new byte[0x20];
                this.byEnableCardReader = new byte[0x200];
                this.byRes1 = new byte[30];
                this.byFingerData = new byte[0x300];
                this.byEmployeeNo = new byte[0x20];
                this.byLeaderFP = new byte[0x100];
                this.byRes = new byte[0x80];
            }
        }

        [StructLayout(LayoutKind.Sequential)]
        public struct NET_DVR_FINGER_PRINT_INFO_COND
        {
            public uint dwSize;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x20, ArraySubType=UnmanagedType.I1)]
            public byte[] byCardNo;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x200, ArraySubType=UnmanagedType.I1)]
            public byte[] byEnableCardReader;
            public uint dwFingerPrintNum;
            public byte byFingerPrintID;
            public byte byCallbackMode;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x1a, ArraySubType=UnmanagedType.I1)]
            public byte[] byRes1;
            public void Init()
            {
                this.byCardNo = new byte[0x20];
                this.byEnableCardReader = new byte[0x200];
                this.byRes1 = new byte[0x1a];
            }
        }

        [StructLayout(LayoutKind.Sequential)]
        public struct NET_DVR_FINGER_PRINT_INFO_COND_V50
        {
            public uint dwSize;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x20, ArraySubType=UnmanagedType.I1)]
            public byte[] byCardNo;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x200, ArraySubType=UnmanagedType.I1)]
            public byte[] byEnableCardReader;
            public uint dwFingerPrintNum;
            public byte byFingerPrintID;
            public byte byCallbackMode;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=2, ArraySubType=UnmanagedType.I1)]
            public byte[] byRes2;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x20, ArraySubType=UnmanagedType.I1)]
            public byte[] byEmployeeNo;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x80, ArraySubType=UnmanagedType.I1)]
            public byte[] byRes1;
            public void Init()
            {
                this.byCardNo = new byte[0x20];
                this.byEnableCardReader = new byte[0x200];
                this.byRes2 = new byte[2];
                this.byEmployeeNo = new byte[0x20];
                this.byRes1 = new byte[0x80];
            }
        }

        [StructLayout(LayoutKind.Sequential)]
        public struct NET_DVR_FINGER_PRINT_INFO_CTRL_BYCARD
        {
            public uint dwSize;
            public byte byMode;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=3)]
            public byte[] byRes1;
            public CHCNetSDK.NET_DVR_FINGER_PRINT_BYCARD struByCard;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x40)]
            public byte[] byRes;
        }

        [StructLayout(LayoutKind.Sequential)]
        public struct NET_DVR_FINGER_PRINT_INFO_CTRL_BYCARD_V50
        {
            public uint dwSize;
            public byte byMode;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=3)]
            public byte[] byRes1;
            public CHCNetSDK.NET_DVR_FINGER_PRINT_BYCARD_V50 struByCard;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x40)]
            public byte[] byRes;
        }

        [StructLayout(LayoutKind.Sequential)]
        public struct NET_DVR_FINGER_PRINT_INFO_CTRL_BYREADER
        {
            public uint dwSize;
            public byte byMode;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=3)]
            public byte[] byRes1;
            public CHCNetSDK.NET_DVR_FINGER_PRINT_BYREADER struByReader;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x40)]
            public byte[] byRes;
        }

        [StructLayout(LayoutKind.Sequential)]
        public struct NET_DVR_FINGER_PRINT_INFO_CTRL_BYREADER_V50
        {
            public uint dwSize;
            public byte byMode;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=3)]
            public byte[] byRes1;
            public CHCNetSDK.NET_DVR_FINGER_PRINT_BYREADER_V50 struByReader;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x40)]
            public byte[] byRes;
        }

        [StructLayout(LayoutKind.Sequential)]
        public struct NET_DVR_FINGER_PRINT_INFO_STATUS_V50
        {
            public uint dwSize;
            public uint dwCardReaderNo;
            public byte byStatus;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x3f)]
            public byte[] byRes;
        }

        [StructLayout(LayoutKind.Sequential)]
        public struct NET_DVR_FINGER_PRINT_STATUS
        {
            public uint dwSize;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x20, ArraySubType=UnmanagedType.I1)]
            public byte[] byCardNo;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x200, ArraySubType=UnmanagedType.I1)]
            public byte[] byCardReaderRecvStatus;
            public byte byFingerPrintID;
            public byte byFingerType;
            public byte byTotalStatus;
            public byte byRes1;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x20, ArraySubType=UnmanagedType.I1)]
            public byte[] byErrorMsg;
            public uint dwCardReaderNo;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x18, ArraySubType=UnmanagedType.I1)]
            public byte[] byRes;
            public void Init()
            {
                this.byCardNo = new byte[0x20];
                this.byCardReaderRecvStatus = new byte[0x200];
                this.byErrorMsg = new byte[0x20];
                this.byRes = new byte[0x18];
            }
        }

        [StructLayout(LayoutKind.Sequential)]
        public struct NET_DVR_FINGER_PRINT_STATUS_V50
        {
            public uint dwSize;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x20, ArraySubType=UnmanagedType.I1)]
            public byte[] byCardNo;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x200, ArraySubType=UnmanagedType.I1)]
            public byte[] byCardReaderRecvStatus;
            public byte byFingerPrintID;
            public byte byFingerType;
            public byte byTotalStatus;
            public byte byRecvStatus;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x20, ArraySubType=UnmanagedType.I1)]
            public byte[] byErrorMsg;
            public uint dwCardReaderNo;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x20, ArraySubType=UnmanagedType.I1)]
            public byte[] byEmployeeNo;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x20, ArraySubType=UnmanagedType.I1)]
            public byte[] byErrorEmployeeNo;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x80, ArraySubType=UnmanagedType.I1)]
            public byte[] byRes;
            public void Init()
            {
                this.byCardNo = new byte[0x20];
                this.byCardReaderRecvStatus = new byte[0x200];
                this.byErrorMsg = new byte[0x20];
                this.byEmployeeNo = new byte[0x20];
                this.byErrorEmployeeNo = new byte[0x20];
                this.byRes = new byte[0x80];
            }
        }

        [StructLayout(LayoutKind.Sequential)]
        public struct NET_DVR_FINGERPRINT_COND
        {
            public uint dwSize;
            public uint dwFingerPrintNum;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x20, ArraySubType=UnmanagedType.I1)]
            public byte[] byCardNo;
            public uint dwEnableReaderNo;
            public byte byFingerPrintID;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x83, ArraySubType=UnmanagedType.I1)]
            public byte[] byRes;
            public void Init()
            {
                this.byCardNo = new byte[0x20];
                this.byRes = new byte[0x83];
            }
        }

        [StructLayout(LayoutKind.Sequential)]
        public struct NET_DVR_FINGERPRINT_RECORD
        {
            public uint dwSize;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x20, ArraySubType=UnmanagedType.I1)]
            public byte[] byCardNo;
            public uint dwFingerPrintLen;
            public uint dwEnableReaderNo;
            public byte byFingerPrintID;
            public byte byFingerType;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=30, ArraySubType=UnmanagedType.I1)]
            public byte[] byRes1;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x300, ArraySubType=UnmanagedType.I1)]
            public byte[] byFingerData;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x60, ArraySubType=UnmanagedType.I1)]
            public byte[] byRes;
            public void Init()
            {
                this.byCardNo = new byte[0x20];
                this.byRes1 = new byte[30];
                this.byFingerData = new byte[0x300];
                this.byRes = new byte[0x60];
            }
        }

        [StructLayout(LayoutKind.Sequential)]
        public struct NET_DVR_FINGERPRINT_STATUS
        {
            public uint dwSize;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x20, ArraySubType=UnmanagedType.I1)]
            public byte[] byCardNo;
            public byte byCardReaderRecvStatus;
            public byte byFingerPrintID;
            public byte byFingerType;
            public byte byRecvStatus;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x20, ArraySubType=UnmanagedType.I1)]
            public byte[] byErrorMsg;
            public uint dwCardReaderNo;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=20, ArraySubType=UnmanagedType.I1)]
            public byte[] byRes;
            public void Init()
            {
                this.byCardNo = new byte[0x20];
                this.byErrorMsg = new byte[0x20];
                this.byRes = new byte[20];
            }
        }

        [StructLayout(LayoutKind.Sequential)]
        public struct NET_DVR_GET_STREAM_UNION
        {
            public CHCNetSDK.NET_DVR_IPCHANINFO struChanInfo;
            public CHCNetSDK.NET_DVR_IPSERVER_STREAM struIPServerStream;
            public CHCNetSDK.NET_DVR_PU_STREAM_CFG struPUStream;
            public CHCNetSDK.NET_DVR_DDNS_STREAM_CFG struDDNSStream;
            public CHCNetSDK.NET_DVR_PU_STREAM_URL struStreamUrl;
            public CHCNetSDK.NET_DVR_HKDDNS_STREAM struHkDDNSStream;
            public CHCNetSDK.NET_DVR_IPCHANINFO_V40 struIPChan;
        }

        [StructLayout(LayoutKind.Sequential)]
        public struct NET_DVR_GROUP_CFG
        {
            public uint dwSize;
            public byte byEnable;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=3, ArraySubType=UnmanagedType.I1)]
            public byte[] byRes1;
            public CHCNetSDK.NET_DVR_VALID_PERIOD_CFG struValidPeriodCfg;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x20, ArraySubType=UnmanagedType.I1)]
            public byte[] byGroupName;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x20, ArraySubType=UnmanagedType.I1)]
            public byte[] byRes2;
        }

        [StructLayout(LayoutKind.Sequential)]
        public struct NET_DVR_HKDDNS_STREAM
        {
            public byte byEnable;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=3, ArraySubType=UnmanagedType.I1)]
            public byte[] byRes;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x40, ArraySubType=UnmanagedType.I1)]
            public byte[] byDDNSDomain;
            public ushort wPort;
            public ushort wAliasLen;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x20, ArraySubType=UnmanagedType.I1)]
            public byte[] byAlias;
            public ushort wDVRSerialLen;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=2, ArraySubType=UnmanagedType.I1)]
            public byte[] byRes1;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x30, ArraySubType=UnmanagedType.I1)]
            public byte[] byDVRSerialNumber;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x20, ArraySubType=UnmanagedType.I1)]
            public byte[] byUserName;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x10, ArraySubType=UnmanagedType.I1)]
            public byte[] byPassWord;
            public byte byChannel;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=11, ArraySubType=UnmanagedType.I1)]
            public byte[] byRes2;
            public void Init()
            {
                this.byRes = new byte[3];
                this.byDDNSDomain = new byte[0x40];
                this.byAlias = new byte[0x20];
                this.byRes1 = new byte[2];
                this.byDVRSerialNumber = new byte[0x30];
                this.byUserName = new byte[0x20];
                this.byPassWord = new byte[0x10];
                this.byRes2 = new byte[11];
            }
        }

        [StructLayout(LayoutKind.Sequential)]
        public struct NET_DVR_HOLIDAY_GROUP_CFG
        {
            public uint dwSize;
            public byte byEnable;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=3, ArraySubType=UnmanagedType.I1)]
            public byte[] byRes1;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x20, ArraySubType=UnmanagedType.I1)]
            public byte[] byGroupName;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x10, ArraySubType=UnmanagedType.U4)]
            public uint[] dwHolidayPlanNo;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x20, ArraySubType=UnmanagedType.I1)]
            public byte[] byRes2;
            public void Init()
            {
                this.byGroupName = new byte[0x20];
                this.dwHolidayPlanNo = new uint[0x10];
                this.byRes1 = new byte[3];
                this.byRes2 = new byte[0x20];
            }
        }

        [StructLayout(LayoutKind.Sequential)]
        public struct NET_DVR_HOLIDAY_GROUP_COND
        {
            public uint dwSize;
            public uint dwHolidayGroupNumber;
            public ushort wLocalControllerID;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x6a, ArraySubType=UnmanagedType.I1)]
            public byte[] byRes;
            public void Init()
            {
                this.byRes = new byte[0x6a];
            }
        }

        [StructLayout(LayoutKind.Sequential)]
        public struct NET_DVR_HOLIDAY_PLAN_CFG
        {
            public uint dwSize;
            public byte byEnable;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=3, ArraySubType=UnmanagedType.I1)]
            public byte[] byRes1;
            public CHCNetSDK.NET_DVR_DATE struBeginDate;
            public CHCNetSDK.NET_DVR_DATE struEndDate;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=8, ArraySubType=UnmanagedType.Struct)]
            public CHCNetSDK.NET_DVR_SINGLE_PLAN_SEGMENT[] struPlanCfg;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x10)]
            public byte[] byRes2;
            public void Init()
            {
                this.struPlanCfg = new CHCNetSDK.NET_DVR_SINGLE_PLAN_SEGMENT[8];
                foreach (CHCNetSDK.NET_DVR_SINGLE_PLAN_SEGMENT net_dvr_single_plan_segment in this.struPlanCfg)
                {
                    net_dvr_single_plan_segment.Init();
                }
                this.byRes1 = new byte[3];
                this.byRes2 = new byte[0x10];
            }
        }

        [StructLayout(LayoutKind.Sequential)]
        public struct NET_DVR_HOLIDAY_PLAN_COND
        {
            public uint dwSize;
            public uint dwHolidayPlanNumber;
            public ushort wLocalControllerID;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x6a, ArraySubType=UnmanagedType.I1)]
            public byte[] byRes;
            public void Init()
            {
                this.byRes = new byte[0x6a];
            }
        }

        [StructLayout(LayoutKind.Sequential)]
        public struct NET_DVR_IPADDR
        {
            [MarshalAs(UnmanagedType.ByValTStr, SizeConst=0x10)]
            public string sIpV4;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x80, ArraySubType=UnmanagedType.I1)]
            public byte[] byIPv6;
            public void Init()
            {
                this.byIPv6 = new byte[0x80];
            }
        }

        [StructLayout(LayoutKind.Sequential)]
        public struct NET_DVR_IPALARMINCFG
        {
            public uint dwSize;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x80, ArraySubType=UnmanagedType.Struct)]
            public CHCNetSDK.NET_DVR_IPALARMININFO[] struIPAlarmInInfo;
        }

        [StructLayout(LayoutKind.Sequential)]
        public struct NET_DVR_IPALARMINCFG_V40
        {
            public uint dwSize;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x1000, ArraySubType=UnmanagedType.Struct)]
            public CHCNetSDK.NET_DVR_IPALARMININFO_V40[] struIPAlarmInInfo;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x100, ArraySubType=UnmanagedType.I1)]
            public byte[] byRes;
        }

        [StructLayout(LayoutKind.Sequential)]
        public struct NET_DVR_IPALARMININFO
        {
            public byte byIPID;
            public byte byAlarmIn;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x12, ArraySubType=UnmanagedType.I1)]
            public byte[] byRes;
        }

        [StructLayout(LayoutKind.Sequential)]
        public struct NET_DVR_IPALARMININFO_V40
        {
            public uint dwIPID;
            public uint dwAlarmIn;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x20, ArraySubType=UnmanagedType.I1)]
            public byte[] byRes;
        }

        [StructLayout(LayoutKind.Sequential)]
        public struct NET_DVR_IPALARMOUTCFG
        {
            public uint dwSize;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x40, ArraySubType=UnmanagedType.Struct)]
            public CHCNetSDK.NET_DVR_IPALARMOUTINFO[] struIPAlarmOutInfo;
        }

        [StructLayout(LayoutKind.Sequential)]
        public struct NET_DVR_IPALARMOUTCFG_V40
        {
            public uint dwSize;
            public uint dwCurIPAlarmOutNum;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x1000, ArraySubType=UnmanagedType.Struct)]
            public CHCNetSDK.NET_DVR_IPALARMOUTINFO_V40[] struIPAlarmOutInfo;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x100, ArraySubType=UnmanagedType.I1)]
            public byte[] byRes;
        }

        [StructLayout(LayoutKind.Sequential)]
        public struct NET_DVR_IPALARMOUTINFO
        {
            public byte byIPID;
            public byte byAlarmOut;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x12, ArraySubType=UnmanagedType.I1)]
            public byte[] byRes;
        }

        [StructLayout(LayoutKind.Sequential)]
        public struct NET_DVR_IPALARMOUTINFO_V40
        {
            public uint dwIPID;
            public uint dwAlarmOut;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x20, ArraySubType=UnmanagedType.I1)]
            public byte[] byRes;
        }

        [StructLayout(LayoutKind.Sequential)]
        public struct NET_DVR_IPCHANINFO
        {
            public byte byEnable;
            public byte byIPID;
            public byte byChannel;
            public byte byIPIDHigh;
            public byte byTransProtocol;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x1f, ArraySubType=UnmanagedType.I1)]
            public byte[] byres;
        }

        [StructLayout(LayoutKind.Sequential)]
        public struct NET_DVR_IPCHANINFO_V40
        {
            public byte byEnable;
            public byte byRes1;
            public ushort wIPID;
            public uint dwChannel;
            public byte byTransProtocol;
            public byte byTransMode;
            public byte byFactoryType;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0xf1, ArraySubType=UnmanagedType.I1)]
            public byte[] byRes;
            public void Init()
            {
                this.byRes = new byte[0xf1];
            }
        }

        [StructLayout(LayoutKind.Sequential)]
        public struct NET_DVR_IPDEVINFO_V31
        {
            public byte byEnable;
            public byte byProType;
            public byte byEnableQuickAdd;
            public byte byRes1;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x20, ArraySubType=UnmanagedType.I1)]
            public byte[] sUserName;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x10, ArraySubType=UnmanagedType.I1)]
            public byte[] sPassword;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x40, ArraySubType=UnmanagedType.I1)]
            public byte[] byDomain;
            public CHCNetSDK.NET_DVR_IPADDR struIP;
            public ushort wDVRPort;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x20, ArraySubType=UnmanagedType.I1)]
            public byte[] szDeviceID;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=2, ArraySubType=UnmanagedType.I1)]
            public byte[] byRes2;
            public void Init()
            {
                this.sUserName = new byte[0x20];
                this.sPassword = new byte[0x10];
                this.byDomain = new byte[0x40];
                this.szDeviceID = new byte[0x20];
                this.byRes2 = new byte[2];
            }
        }

        [StructLayout(LayoutKind.Sequential)]
        public struct NET_DVR_IPPARACFG_V40
        {
            public uint dwSize;
            public uint dwGroupNum;
            public uint dwAChanNum;
            public uint dwDChanNum;
            public uint dwStartDChan;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x40)]
            public byte[] byAnalogChanEnable;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x40)]
            public CHCNetSDK.NET_DVR_IPDEVINFO_V31[] struIPDevInfo;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x40)]
            public CHCNetSDK.NET_DVR_STREAM_MODE[] struStreamMode;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=20)]
            public byte[] byRes2;
        }

        [StructLayout(LayoutKind.Sequential)]
        public struct NET_DVR_IPSERVER_STREAM
        {
            public byte byEnable;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=3, ArraySubType=UnmanagedType.I1)]
            public byte[] byRes;
            public CHCNetSDK.NET_DVR_IPADDR struIPServer;
            public ushort wPort;
            public ushort wDvrNameLen;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x20, ArraySubType=UnmanagedType.I1)]
            public byte[] byDVRName;
            public ushort wDVRSerialLen;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=2, ArraySubType=UnmanagedType.U2)]
            public ushort[] byRes1;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x30, ArraySubType=UnmanagedType.I1)]
            public byte[] byDVRSerialNumber;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x20, ArraySubType=UnmanagedType.I1)]
            public byte[] byUserName;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x10, ArraySubType=UnmanagedType.I1)]
            public byte[] byPassWord;
            public byte byChannel;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=11, ArraySubType=UnmanagedType.I1)]
            public byte[] byRes2;
            public void Init()
            {
                this.byRes = new byte[3];
                this.byRes1 = new ushort[2];
                this.byUserName = new byte[0x20];
                this.byPassWord = new byte[0x10];
                this.byDVRSerialNumber = new byte[0x30];
                this.byDVRName = new byte[0x20];
                this.byRes2 = new byte[11];
            }
        }

        [StructLayout(LayoutKind.Sequential)]
        public struct NET_DVR_JPEGPARA
        {
            public short wPicSize;
            public short wPicQuality;
        }

        [StructLayout(LayoutKind.Sequential)]
        public struct NET_DVR_JSON_DATA_CFG
        {
            public uint dwSize;
            public IntPtr lpJsonData;
            public uint dwJsonDataSize;
            public IntPtr lpPicData;
            public uint dwPicDataSize;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x100)]
            public byte[] byRes;
        }

        [StructLayout(LayoutKind.Sequential)]
        public struct NET_DVR_LOG_V30
        {
            public CHCNetSDK.NET_DVR_TIME strLogTime;
            public uint dwMajorType;
            public uint dwMinorType;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x10, ArraySubType=UnmanagedType.I1)]
            public byte[] sPanelUser;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x10, ArraySubType=UnmanagedType.I1)]
            public byte[] sNetUser;
            public CHCNetSDK.NET_DVR_IPADDR struRemoteHostAddr;
            public uint dwParaType;
            public uint dwChannel;
            public uint dwDiskNumber;
            public uint dwAlarmInPort;
            public uint dwAlarmOutPort;
            public uint dwInfoLen;
            [MarshalAs(UnmanagedType.ByValTStr, SizeConst=0x2e40)]
            public string sInfo;
        }

        [StructLayout(LayoutKind.Sequential)]
        public struct NET_DVR_NETCFG_V30
        {
            public uint dwSize;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=2, ArraySubType=UnmanagedType.Struct)]
            public CHCNetSDK.NET_DVR_ETHERNET_V30[] struEtherNet;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=2, ArraySubType=UnmanagedType.Struct)]
            public CHCNetSDK.NET_DVR_IPADDR[] struRes1;
            public CHCNetSDK.NET_DVR_IPADDR struAlarmHostIpAddr;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=2, ArraySubType=UnmanagedType.U2)]
            public ushort[] wRes2;
            public ushort wAlarmHostIpPort;
            public byte byUseDhcp;
            public byte byIPv6Mode;
            public CHCNetSDK.NET_DVR_IPADDR struDnsServer1IpAddr;
            public CHCNetSDK.NET_DVR_IPADDR struDnsServer2IpAddr;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x40, ArraySubType=UnmanagedType.I1)]
            public byte[] byIpResolver;
            public ushort wIpResolverPort;
            public ushort wHttpPortNo;
            public CHCNetSDK.NET_DVR_IPADDR struMulticastIpAddr;
            public CHCNetSDK.NET_DVR_IPADDR struGatewayIpAddr;
            public CHCNetSDK.NET_DVR_PPPOECFG struPPPoE;
            public byte byEnablePrivateMulticastDiscovery;
            public byte byEnableOnvifMulticastDiscovery;
            public byte byEnableDNS;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x3d, ArraySubType=UnmanagedType.I1)]
            public byte[] byRes;
            public void Init()
            {
                this.struEtherNet = new CHCNetSDK.NET_DVR_ETHERNET_V30[2];
                this.struAlarmHostIpAddr = new CHCNetSDK.NET_DVR_IPADDR();
                this.struDnsServer1IpAddr = new CHCNetSDK.NET_DVR_IPADDR();
                this.struDnsServer2IpAddr = new CHCNetSDK.NET_DVR_IPADDR();
                this.byIpResolver = new byte[0x40];
                this.struMulticastIpAddr = new CHCNetSDK.NET_DVR_IPADDR();
                this.struGatewayIpAddr = new CHCNetSDK.NET_DVR_IPADDR();
                this.struPPPoE = new CHCNetSDK.NET_DVR_PPPOECFG();
            }
        }

        [StructLayout(LayoutKind.Sequential)]
        public struct NET_DVR_NETCFG_V50
        {
            public uint dwSize;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=2, ArraySubType=UnmanagedType.Struct)]
            public CHCNetSDK.NET_DVR_ETHERNET_V30[] struEtherNet;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=2, ArraySubType=UnmanagedType.Struct)]
            public CHCNetSDK.NET_DVR_IPADDR[] struRes1;
            public CHCNetSDK.NET_DVR_IPADDR struAlarmHostIpAddr;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=4, ArraySubType=UnmanagedType.I1)]
            public byte[] byRes2;
            public ushort wAlarmHostIpPort;
            public byte byUseDhcp;
            public byte byIPv6Mode;
            public CHCNetSDK.NET_DVR_IPADDR struDnsServer1IpAddr;
            public CHCNetSDK.NET_DVR_IPADDR struDnsServer2IpAddr;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x40, ArraySubType=UnmanagedType.I1)]
            public byte[] byIpResolver;
            public ushort wIpResolverPort;
            public ushort wHttpPortNo;
            public CHCNetSDK.NET_DVR_IPADDR struMulticastIpAddr;
            public CHCNetSDK.NET_DVR_IPADDR struGatewayIpAddr;
            public CHCNetSDK.NET_DVR_PPPOECFG struPPPoE;
            public byte byEnablePrivateMulticastDiscovery;
            public byte byEnableOnvifMulticastDiscovery;
            public ushort wAlarmHost2IpPort;
            public CHCNetSDK.NET_DVR_IPADDR struAlarmHost2IpAddr;
            public byte byEnableDNS;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x257, ArraySubType=UnmanagedType.I1)]
            public byte[] byRes;
            public void Init()
            {
                this.struEtherNet = new CHCNetSDK.NET_DVR_ETHERNET_V30[2];
                this.struRes1 = new CHCNetSDK.NET_DVR_IPADDR[2];
                this.struAlarmHostIpAddr = new CHCNetSDK.NET_DVR_IPADDR();
                this.struAlarmHost2IpAddr = new CHCNetSDK.NET_DVR_IPADDR();
                this.struDnsServer1IpAddr = new CHCNetSDK.NET_DVR_IPADDR();
                this.struDnsServer2IpAddr = new CHCNetSDK.NET_DVR_IPADDR();
                this.byIpResolver = new byte[0x40];
                this.struMulticastIpAddr = new CHCNetSDK.NET_DVR_IPADDR();
                this.struGatewayIpAddr = new CHCNetSDK.NET_DVR_IPADDR();
                this.struPPPoE = new CHCNetSDK.NET_DVR_PPPOECFG();
                this.byRes = new byte[0x257];
            }
        }

        [StructLayout(LayoutKind.Sequential)]
        public struct NET_DVR_PLAN_TEMPLATE
        {
            public uint dwSize;
            public byte byEnable;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=3, ArraySubType=UnmanagedType.I1)]
            public byte[] byRes1;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x20, ArraySubType=UnmanagedType.I1)]
            public byte[] byTemplateName;
            public uint dwWeekPlanNo;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x10, ArraySubType=UnmanagedType.U4)]
            public uint[] dwHolidayGroupNo;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x20, ArraySubType=UnmanagedType.I1)]
            public byte[] byRes2;
            public void Init()
            {
                this.byTemplateName = new byte[0x20];
                this.dwHolidayGroupNo = new uint[0x10];
                this.byRes1 = new byte[3];
                this.byRes2 = new byte[0x20];
            }
        }

        [StructLayout(LayoutKind.Sequential)]
        public struct NET_DVR_PLAN_TEMPLATE_COND
        {
            public uint dwSize;
            public uint dwPlanTemplateNumber;
            public ushort wLocalControllerID;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x6a, ArraySubType=UnmanagedType.I1)]
            public byte[] byRes;
            public void Init()
            {
                this.byRes = new byte[0x6a];
            }
        }

        [StructLayout(LayoutKind.Sequential)]
        public struct NET_DVR_PPPOECFG
        {
            public uint dwPPPOE;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x20, ArraySubType=UnmanagedType.I1)]
            public byte[] sPPPoEUser;
            [MarshalAs(UnmanagedType.ByValTStr, SizeConst=0x10)]
            public string sPPPoEPassword;
            public CHCNetSDK.NET_DVR_IPADDR struPPPoEIP;
        }

        [StructLayout(LayoutKind.Sequential)]
        public struct NET_DVR_PREVIEWINFO
        {
            public int lChannel;
            public uint dwStreamType;
            public uint dwLinkMode;
            public IntPtr hPlayWnd;
            public uint bBlocked;
            public uint bPassbackRecord;
            public byte byPreviewMode;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x20, ArraySubType=UnmanagedType.I1)]
            public byte[] byStreamID;
            public byte byProtoType;
            public byte byRes1;
            public byte byVideoCodingType;
            public uint dwDisplayBufNum;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0xd8, ArraySubType=UnmanagedType.I1)]
            public byte[] byRes;
        }

        [StructLayout(LayoutKind.Sequential)]
        public struct NET_DVR_PU_STREAM_CFG
        {
            public uint dwSize;
            public CHCNetSDK.NET_DVR_STREAM_MEDIA_SERVER_CFG struStreamMediaSvrCfg;
            public CHCNetSDK.NET_DVR_DEV_CHAN_INFO struDevChanInfo;
        }

        [StructLayout(LayoutKind.Sequential)]
        public struct NET_DVR_PU_STREAM_URL
        {
            public byte byEnable;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=240, ArraySubType=UnmanagedType.I1)]
            public byte[] strURL;
            public byte byTransPortocol;
            public ushort wIPID;
            public byte byChannel;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=7, ArraySubType=UnmanagedType.I1)]
            public byte[] byRes;
            public void Init()
            {
                this.byRes = new byte[7];
                this.strURL = new byte[240];
            }
        }

        [StructLayout(LayoutKind.Sequential)]
        public struct NET_DVR_SETUPALARM_PARAM
        {
            public uint dwSize;
            public byte byLevel;
            public byte byAlarmInfoType;
            public byte byRetAlarmTypeV40;
            public byte byRetDevInfoVersion;
            public byte byRetVQDAlarmType;
            public byte byFaceAlarmDetection;
            public byte bySupport;
            public byte byBrokenNetHttp;
            public ushort wTaskNo;
            public byte byDeployType;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=3, ArraySubType=UnmanagedType.I1)]
            public byte[] byRes1;
            public byte byAlarmTypeURL;
            public byte byCustomCtrl;
        }

        [StructLayout(LayoutKind.Sequential)]
        public struct NET_DVR_SIMPLE_DAYTIME
        {
            public byte byHour;
            public byte byMinute;
            public byte bySecond;
            public byte byRes;
        }

        [StructLayout(LayoutKind.Sequential)]
        public struct NET_DVR_SINGLE_PLAN_SEGMENT
        {
            public byte byEnable;
            public byte byDoorStatus;
            public byte byVerifyMode;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=5, ArraySubType=UnmanagedType.I1)]
            public byte[] byRes;
            public CHCNetSDK.NET_DVR_TIME_SEGMENT struTimeSegment;
            public void Init()
            {
                this.byRes = new byte[5];
            }
        }

        [StructLayout(LayoutKind.Sequential)]
        public struct NET_DVR_STREAM_MEDIA_SERVER_CFG
        {
            public byte byValid;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=3, ArraySubType=UnmanagedType.I1)]
            public byte[] byRes1;
            public CHCNetSDK.NET_DVR_IPADDR struDevIP;
            public ushort wDevPort;
            public byte byTransmitType;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x45, ArraySubType=UnmanagedType.I1)]
            public byte[] byRes2;
            public void Init()
            {
                this.byRes1 = new byte[3];
                this.byRes2 = new byte[0x45];
            }
        }

        [StructLayout(LayoutKind.Sequential)]
        public struct NET_DVR_STREAM_MODE
        {
            public byte byGetStreamType;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=3)]
            public byte[] byRes;
            public CHCNetSDK.NET_DVR_GET_STREAM_UNION uGetStream;
        }

        [StructLayout(LayoutKind.Sequential)]
        public struct NET_DVR_TIME
        {
            public int dwYear;
            public int dwMonth;
            public int dwDay;
            public int dwHour;
            public int dwMinute;
            public int dwSecond;
        }

        [StructLayout(LayoutKind.Sequential)]
        public struct NET_DVR_TIME_EX
        {
            public ushort wYear;
            public byte byMonth;
            public byte byDay;
            public byte byHour;
            public byte byMinute;
            public byte bySecond;
            public byte byRes;
        }

        [StructLayout(LayoutKind.Sequential)]
        public struct NET_DVR_TIME_SEGMENT
        {
            public CHCNetSDK.NET_DVR_SIMPLE_DAYTIME struBeginTime;
            public CHCNetSDK.NET_DVR_SIMPLE_DAYTIME struEndTime;
        }

        [StructLayout(LayoutKind.Sequential)]
        public struct NET_DVR_USER_LOGIN_INFO
        {
            [MarshalAs(UnmanagedType.ByValTStr, SizeConst=0x81)]
            public string sDeviceAddress;
            public byte byUseTransport;
            public ushort wPort;
            [MarshalAs(UnmanagedType.ByValTStr, SizeConst=0x40)]
            public string sUserName;
            [MarshalAs(UnmanagedType.ByValTStr, SizeConst=0x40)]
            public string sPassword;
            public CHCNetSDK.LoginResultCallBack cbLoginResult;
            public IntPtr pUser;
            public bool bUseAsynLogin;
            public byte byProxyType;
            public byte byUseUTCTime;
            public byte byLoginMode;
            public byte byHttps;
            public int iProxyID;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=120, ArraySubType=UnmanagedType.I1)]
            public byte[] byRes3;
        }

        [StructLayout(LayoutKind.Sequential)]
        public struct NET_DVR_VALID_PERIOD_CFG
        {
            public byte byEnable;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=3, ArraySubType=UnmanagedType.I1)]
            public byte[] byRes1;
            public CHCNetSDK.NET_DVR_TIME_EX struBeginTime;
            public CHCNetSDK.NET_DVR_TIME_EX struEndTime;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x20, ArraySubType=UnmanagedType.I1)]
            public byte[] byRes2;
        }

        [StructLayout(LayoutKind.Sequential)]
        public struct NET_DVR_VIDEO_CALL_COND
        {
            public uint dwSize;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x80, ArraySubType=UnmanagedType.I1)]
            public byte[] byRes;
            public void Init()
            {
                this.byRes = new byte[0x80];
            }
        }

        [StructLayout(LayoutKind.Sequential)]
        public struct NET_DVR_VIDEO_CALL_PARAM
        {
            public uint dwSize;
            public uint dwCmdType;
            public ushort wPeriod;
            public ushort wBuildingNumber;
            public ushort wUnitNumber;
            public ushort wFloorNumber;
            public ushort wRoomNumber;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x76, ArraySubType=UnmanagedType.I1)]
            public byte[] byRes;
            public void Init()
            {
                this.byRes = new byte[0x76];
            }
        }

        [StructLayout(LayoutKind.Sequential)]
        public struct NET_DVR_VOLUME_CFG
        {
            public uint dwSize;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=8)]
            public ushort[] wVolume;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x20)]
            public byte[] byRes;
        }

        [StructLayout(LayoutKind.Sequential)]
        public struct NET_DVR_WEEK_PLAN_CFG
        {
            public uint dwSize;
            public byte byEnable;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=3, ArraySubType=UnmanagedType.I1)]
            public byte[] byRes1;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x38, ArraySubType=UnmanagedType.Struct)]
            public CHCNetSDK.NET_DVR_SINGLE_PLAN_SEGMENT[] struPlanCfg;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x10, ArraySubType=UnmanagedType.I1)]
            public byte[] byRes2;
            public void Init()
            {
                this.struPlanCfg = new CHCNetSDK.NET_DVR_SINGLE_PLAN_SEGMENT[0x38];
                foreach (CHCNetSDK.NET_DVR_SINGLE_PLAN_SEGMENT net_dvr_single_plan_segment in this.struPlanCfg)
                {
                    net_dvr_single_plan_segment.Init();
                }
                this.byRes1 = new byte[3];
                this.byRes2 = new byte[0x10];
            }
        }

        [StructLayout(LayoutKind.Sequential)]
        public struct NET_DVR_WEEK_PLAN_COND
        {
            public uint dwSize;
            public uint dwWeekPlanNumber;
            public ushort wLocalControllerID;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x6a, ArraySubType=UnmanagedType.I1)]
            public byte[] byRes;
            public void Init()
            {
                this.byRes = new byte[0x6a];
            }
        }

        [StructLayout(LayoutKind.Sequential)]
        public struct NET_DVR_XML_CONFIG_INPUT
        {
            public uint dwSize;
            public IntPtr lpRequestUrl;
            public uint dwRequestUrlLen;
            public IntPtr lpInBuffer;
            public uint dwInBufferSize;
            public uint dwRecvTimeOut;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x20)]
            public byte[] byRes;
        }

        [StructLayout(LayoutKind.Sequential)]
        public struct NET_DVR_XML_CONFIG_OUTPUT
        {
            public uint dwSize;
            public IntPtr lpOutBuffer;
            public uint dwOutBufferSize;
            public uint dwReturnedXMLSize;
            public IntPtr lpStatusBuffer;
            public uint dwStatusSize;
            [MarshalAs(UnmanagedType.ByValArray, SizeConst=0x20)]
            public byte[] byRes;
        }

        public enum NET_SDK_CALLBACK_STATUS_NORMAL
        {
            NET_SDK_CALLBACK_STATUS_SUCCESS = 0x3e8,
            NET_SDK_CALLBACK_STATUS_PROCESSING = 0x3e9,
            NET_SDK_CALLBACK_STATUS_FAILED = 0x3ea,
            NET_SDK_CALLBACK_STATUS_EXCEPTION = 0x3eb,
            NET_SDK_CALLBACK_STATUS_LANGUAGE_MISMATCH = 0x3ec,
            NET_SDK_CALLBACK_STATUS_DEV_TYPE_MISMATCH = 0x3ed,
            NET_DVR_CALLBACK_STATUS_SEND_WAIT = 0x3ee
        }

        public enum NET_SDK_CALLBACK_TYPE
        {
            NET_SDK_CALLBACK_TYPE_STATUS,
            NET_SDK_CALLBACK_TYPE_PROGRESS,
            NET_SDK_CALLBACK_TYPE_DATA
        }

        public enum NET_SDK_GET_NEXT_STATUS
        {
            NET_SDK_GET_NEXT_STATUS_SUCCESS = 0x3e8,
            NET_SDK_GET_NETX_STATUS_NEED_WAIT = 0x3e9,
            NET_SDK_GET_NEXT_STATUS_FINISH = 0x3ea,
            NET_SDK_GET_NEXT_STATUS_FAILED = 0x3eb
        }

        public enum NET_SDK_SENDWITHRECV_STATUS
        {
            NET_SDK_CONFIG_STATUS_SUCCESS = 0x3e8,
            NET_SDK_CONFIG_STATUS_NEEDWAIT = 0x3e9,
            NET_SDK_CONFIG_STATUS_FINISH = 0x3ea,
            NET_SDK_CONFIG_STATUS_FAILED = 0x3eb,
            NET_SDK_CONFIG_STATUS_EXCEPTION = 0x3ec
        }

        public delegate void RealDataCallBack(int lPlayHandle, uint dwDataType, IntPtr pBuffer, uint dwBufSize, IntPtr pUser);

        public delegate void REALDATACALLBACK(int lRealHandle, uint dwDataType, ref byte pBuffer, uint dwBufSize, IntPtr pUser);

        public delegate void RemoteConfigCallback(uint dwType, IntPtr lpBuffer, uint dwBufLen, IntPtr pUserData);

        public delegate void VOICEDATACALLBACKV30(int lVoiceComHandle, string pRecvDataBuffer, uint dwBufSize, byte byAudioFlag, IntPtr pUser);
    }
}

